I have a computer science background and a little embedded systems programming with an ST MicroElectronics STM32 board, but I am new to the Jetson TX2 board and i2c communication with Linux. I am trying to send i2c information from the tx2 to the Adafruit 16 - channel servo controller, but am getting Remote I/O errors.
Here is my code:
My terminal output:
My output when I search i2cdetect:
I am also connected to the bus with sdl and sca pins on the j21 pinout here:
I have been following the Linux Wiki for interacting with i2c devices, but have had no luck. I open the file descriptor and then use ioctl with the i2c address of 0x40. However, when I try to write to the i2c, I get a Remote I/O error. I noticed there is also something at address 0x70. In the Linux wiki it mentions, under the Writing to ADC section that some devices require you to write to a device register. Is that what I am missing? Please help. I have been working on this for a little while now and would like to learn and push my project forward. Thank you in advance.
Charlie Barber