A quick little post for my future reference really. Wanted to get an i2C Analogue to Digital Converter (ADC) working on a Raspberry Pi. No real application as yet, but sure to be one in the future.
Most of the information to make this work was taken from posts by Grumpy Mike on the Raspberry Pi forums. Got a couple of PCF8591s nice & cheep from
Below is the very basic and non-defensive Python code to simply read the voltage provided by the pot to ADC channel 0 and print a proportional value between 0 & 255:
#Read a value from analogue input 0
Current Project / Post can also be found using:
- pcf8591 схема включения