This is a cache of https://discuss.96boards.org/t/how-do-i-use-i2c-of-dragon-board-410c/5234. It is a snapshot of the page at 2024-09-19T02:22:07.905+0000.
How do i use <strong>i2c</strong> of dragon board 410c - 96boards - 96Boards Forum

How do i use i2c of dragon board 410c

I am implementing i2c to read ADS1115 data by using python, but I can’t find any resources to get a headstart. Can someone please tell me how to do that, so that I get things moving, at least.

There is an existing kernel driver for this particular i2c device, you can enable it via SENSORS_ADS1015 config, and add the corresponding device-tree node. But if you really want to drive it yourself from python/userspace/i2c, you can use python-smbus library (pydoc smbus for documentation) and follow the datasheet [1].

[1] https://cdn-shop.adafruit.com/datasheets/ads1115.pdf

I am implementing i2c to read ADS1115 data by using python, but I
can’t find any resources to get a headstart. Can someone please tell
me how to do that, so that I get things moving, at least.

Ideally you should first check hardware connectivity with i2cdetect (and
maybe i2cset/get is appropriate). It is useful to know you have
everything hooked up correctly before jumping into python.

Note that DB410C requires i2cdetect be run with the -r argument
(because the controller does not support “quick write”).

Once you have the hardware working then I think library code such as
https://github.com/adafruit/Adafruit_Python_ADS1x15 should work with
little or no modification on DB410C.