Yeah i know this exists, but i have none of these and i have plenty of trinkets, and i need to do analog reads. I2c is interesting anyway, some devices need it i believe.
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-with-the-raspberry-pi?view=all > > 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