You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
Hi Natdan/Robert
I'm using PI4J in a university project. It has been great experience so far. Thanks for the hard work you have done
I'm connecting an AD/DA to Raspberry PI based on PCF 8591 (this is the model for your reference http://blog.chrysocome.net/2012/12/i2c-analog-to-digital-converter.html)
I've 4 different moisture sensors i need to get data from. As far as i understand i should be able to connect each of them into the 4 Analog input ports available (AN0-1-2-3).
i was able to read the moisture (1 byte of data) via gpio -x pcf8591:0x48:120 aread 120.
I was only able to read data from sensor connected to pin AN0. Nothing came from sensors connected to pins A1-2-3.
Questions for you are:
do you have a working example on how to perform the same read via PI4J?
is there any example or document explaining how i can read data from all other sensors?
Looking forward to your response and again thanks very much for your work!
The text was updated successfully, but these errors were encountered:
i got the answer :)
the java snippet for those who are interested is:
private I2CBus bus = I2CFactory.getInstance(0x1);
private I2CDevice device = bus.getDevice(0x48);
Hi Natdan/Robert
I'm using PI4J in a university project. It has been great experience so far. Thanks for the hard work you have done
I'm connecting an AD/DA to Raspberry PI based on PCF 8591 (this is the model for your reference http://blog.chrysocome.net/2012/12/i2c-analog-to-digital-converter.html)
I've 4 different moisture sensors i need to get data from. As far as i understand i should be able to connect each of them into the 4 Analog input ports available (AN0-1-2-3).
i was able to read the moisture (1 byte of data) via gpio -x pcf8591:0x48:120 aread 120.
I was only able to read data from sensor connected to pin AN0. Nothing came from sensors connected to pins A1-2-3.
Questions for you are:
Looking forward to your response and again thanks very much for your work!
The text was updated successfully, but these errors were encountered: