Using final GPIOs. File renamed.

This commit is contained in:
Martin Brodbeck 2022-05-24 21:35:18 +02:00
parent a75f54fc84
commit ce657b3636

View file

@ -7,15 +7,15 @@ from pico_i2c_lcd import I2cLcd
import _thread
# Relais
relais = Pin(15, machine.Pin.OUT, value = 1)
relais = Pin(18, machine.Pin.OUT, value = 1)
led_onboard = Pin(25, machine.Pin.OUT, value = 0)
# Temperature
temp_sensor = DS18X20(OneWire(Pin(16)))
temp_sensor = DS18X20(OneWire(Pin(28)))
sensor_id = temp_sensor.scan()[0]
# LCD Display
i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=400000)
i2c = I2C(1, sda=Pin(26), scl=Pin(27), freq=400000)
I2C_ADDR = 0x27
I2C_NUM_ROWS = 2
I2C_NUM_COLS = 16
@ -34,9 +34,9 @@ degree = (
)
# Buttons
button1 = Pin(2, Pin.IN, Pin.PULL_DOWN)
button2 = Pin(3, Pin.IN, Pin.PULL_DOWN)
button3 = Pin(4, Pin.IN, Pin.PULL_DOWN)
button1 = Pin(17, Pin.IN, Pin.PULL_DOWN)
button2 = Pin(16, Pin.IN, Pin.PULL_DOWN)
button3 = Pin(15, Pin.IN, Pin.PULL_DOWN)
global button1_pressed
global button2_pressed
global button3_pressed