I finally bought 2 of those chips, and it works very well. A simple file read from Pharo and i get my analog values (although i don't understand them, but that has nothing to do with the reading). It is very, very fast. Thanks again :) Steven. Le 2017-12-20 05:20, K K Subbu a écrit :
On Wednesday 20 December 2017 03:50 AM, Steven Costiou wrote:
So connecting an Arduino-like device to the raspberry that is configured as an i2c slave, Pharo can ask for analog values. I will try tomorrow with analog sensors, I will share if i manage to build nice examples.
Seems to be even easier using a special chip: https://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-...
An Arduino would be an overkill. Also, there is no need for bitbanging. MCP3008 is are directly supported by the IIO subsystem and its channel data is demuxed in /sys/bus/iio/devices/iio:device<n>
http://www.jumpnowtek.com/rpi/Using-mcp3008-ADCs-with-Raspberry-Pis.html
HTH .. Subbu