@BlackJack
import time, smbus, threading
bus = smbus.SMBus(1) # Rev 2 Pi
bus.write_byte_data(0x20, 0x00, 0x00)
bus.write_byte_data(0x20, 0x01, 0xFF)
def Schalten (Zustand, Stelle):
aktuell = bus.read_byte_data(0x20, 0x12)
Potenz=[1,2,4,8,16,32,64,128]
if Zustand==1:
neu=aktuell|Potenz ...