Dobrica Pavlinušić's random unstructured stuff
PCF8591: Revision 8
{image: PCF8591_YL-40_schema.jpg}

{image: pcf8591-schema.jpg}

{image: sku_150190_1.jpg}

PCF8591 8-Bit A/D D/A Converter Module

AIN0 - Jumper P5 - Light Dependent Resistor (LDR)
AIN1 - Jumper P4 - Thermistor
AIN2 - Not connected
AIN3 - Jumper P6 - Potentiometer


^ [RaspberryPi]

.pre
pi@raspberrypi ~ $ grep snd /etc/modprobe.d/raspi-blacklist.conf
blacklist snd-bcm2708


pi@raspberrypi ~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


pi@raspberrypi ~ $ gpio -x pcf8591:120:0x48 readall
+------+---------+--------+
| Pin | Digital | Analog |
+------+---------+--------+
| 120 | 0 | 132 |
| 121 | 0 | 224 |
| 122 | 0 | 89 |
| 123 | 0 | 119 |
+------+---------+--------+
pi@raspberrypi ~ $ gpio -x pcf8591:120:0x48 aread 120
132
pi@raspberrypi ~ $ gpio -x pcf8591:120:0x48 aread 121
224
pi@raspberrypi ~ $ gpio -x pcf8591:120:0x48 aread 122
99
pi@raspberrypi ~ $ gpio -x pcf8591:120:0x48 aread 123
118

pi@raspberrypi ~ $ gpio -x pcf8591:120:0x48 awrite 120 128
.pre