-
Hi everyone i'm currently trying to read a moisture sensor with a raspberrypi zero W. I'm a beginner and i'm a bit lost with the i2c protocol. Currently I have exactly what is on the diagram on page 8. Now i'm trying to understand and translate this exemple in pi4jv2. Even when I look at these examples, I can’t figure out the line that allows the A0 pin to be read. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi The rpi-driver library (includes ADS1115 java driver): ADS1115 driver implementation: ADS1115 example of use: |
Beta Was this translation helpful? Give feedback.
Hi
You need a piece of code which uses pi4j 2.1.1 library and talks to ADS1115 chip. Than you will be able to read A0 input. You can use rpi-driver library i just created.
I just succesfully tested ADS1115 and pi4j 2.1.1 here are the links:
The rpi-driver library (includes ADS1115 java driver):
https://github.com/jveverka/rpi-projects/tree/pi4j-v2/rpi-drivers
ADS1115 driver implementation:
https://github.com/jveverka/rpi-projects/blob/pi4j-v2/rpi-drivers/src/main/java/one/microproject/rpi/hardware/gpio/sensors/impl/ADS1115Impl.java
ADS1115 example of use:
https://github.com/jveverka/rpi-projects/blob/pi4j-v2/rpi-drivers/src/main/java/one/microproject/rpi/hardware/gpio/sensors/tests/ADS111…