I2C: I don't even know how to start!

BryanBarbosa
 
Posts: 12
Joined: Fri May 14, 2021 2:40 am

I2C: I don't even know how to start!

Thu Mar 17, 2022 11:25 pm

Hello Vocorers!
I've been trying to use the I2C on Vocore 2 to get data from an accelerometer, two IR sensors, one light sensor, one temperature sensor and one Ads1115 module to get readings from analog pins. BUT I DON'T EVEN KNOW HOW TO START!!! :(
Could someone please help me by giving the direction?
I already installed i2c-tools on Vocore 2, but I can not understand how does it work.
Could someone indicate the way?

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: I2C: I don't even know how to start!

Mon Mar 21, 2022 4:20 am

1. connect i2c device CLK, DAT to VoCore2 I2C port
2. power on that devices.
3. use i2cdetect -y 0, check if there is any device on i2cbus can be detected.

From this step you can find the device and its address. rest need to code because different i2c device has different read/write way, maybe not compatible i2cdump and i2cwrite or i2cread.

Return to VoCore2/Lite/Ultimate

Who is online

Users browsing this forum: Google [Bot] and 51 guests