Reading analog sensors with the Raspberry Pi
Adafruit just posted an awesome tutorial on reading analog sensors
with the Raspberry Pi. Itís a great walkthrough that can be applied to your next Raspi project as well as any project where you just need one more
Earlier, the folks over at Adafruit posted a tutorial
on using a MCP3008
ADC with the Raspi to directly read analog values using a Raspi. Sometimes, though, you donít need eight analog inputs and a 12-bit ADC to get a project off the ground. Adafruitís tutorial for reading analog values without an ADC relies on a single 1μF ceramic capacitor attached between a digital input and ground. By pulling the sensor line high for a millisecond or two, the capacitor charges at different rates depending on the value of the analog sensor.
Yes, itís just an RC timing circuit but seeing as how the Raspi doesnít have an analog input, we figure this tutorial could help out a few people.