Forum

RPI, I2C, select ch...
 
Powiadomienia
Wyczyść wszystko

RPI, I2C, select channel for PCF8591

1 Wpisy
1 Użytkownicy
0 Reactions
2,125 Widoki
0
Rozpoczynający temat

RPI, I2C, select channel for PCF8591

1 odpowiedź
0
Rozpoczynający temat

1. find your ID for PCF8591 ( http://muszak.eu/answers/raspberry-pi-dedect-i2c-array-then-get-value/ )

2. set channel using

 i2cset -y 1 0x48 0x00

where 0x00 mean firest channel, 0x01 is for second channel etc.

3. then just read value from PCF, use two time same command to get proper value

i2cget -y 1 0x48 - dummy read, last value or power status
i2cget -y 1 0x48 - correct value

 

 

Twoja odpowiedź

Nazwa autora

E-mail autora

Twoje zapytanie *

 
Podgląd 0 rewizje Zapisano
Udostępnij: