Mam do raspberry podłączony expander PCF8574. Moduł jest zasilany 5V. Skorzystałem z przykładowego kodu znalezionego gdzieś w necie (migająca dioda). Problem w tym że na wyjściu jest napięcie ok. 1.7V. Czy można uzyskać 5V?
Kod: Zaznacz cały
import smbus
import time
LED1 = 0x01
LED2 = 0x02
LED3 = 0x04
LED4 = 0x08
LED5 = 0x10
LED6 = 0x20
LED7 = 0x40
LED8 = 0x80
bus = smbus.SMBus(1)
while True:
bus.write_byte(0x20, LED1)
time.sleep(0.5)
bus.write_byte(0x20, LED2)
time.sleep(0.5)
bus.write_byte(0x20, LED3)
time.sleep(0.5)
bus.write_byte(0x20, LED4)
time.sleep(0.5)