Effacer les filtres
Effacer les filtres

Connecting TOF10120 Sensor to Arduino Uno via I2C

7 vues (au cours des 30 derniers jours)
Brian Peoples
Brian Peoples le 17 Mar 2022
Réponse apportée : Chetan le 27 Sep 2023
Hello--
I am trying to get my command window to display live distance measurements from a TOF10120 sensor, but am hhaving some difficulties setting it up. It is connected I2C. Little bit of a noob here when it comes to arduino support package. Any help would be greatly appreciated!!
Only have this so far:
a = arduino('COM3','Uno','Libraries','I2C');
dev = device(a,'I2CAddress','0x52');
Any heelp would be amazing.

Réponses (1)

Chetan
Chetan le 27 Sep 2023
I understand that you are facing difficulties in setting up the Sensor via IC2.
Here is an example documentation of the usage of I2C devices on Arduino hardware: https://www.mathworks.com/help/supportpkg/arduinoio/ug/measure-temperature-from-i2c-device-on-arduino-hardware.html
This will help you in understanding the I2C communication with Arduino hardware in detail.
I am also attaching a document that will help you with the functions that can be used in reading and writing to I2C devices connected to Arduino hardware:
I hope these suggestions help you resolve the issue you are facing.

Catégories

En savoir plus sur Arduino Hardware dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by