from machine import Pin, I2C
from time import sleep
from dht import DHT22
import ssd1306
# set up needed variable for pasword entering --
password = "101"
entered = ""
wrong = 0
# buttons
buttons = [Pin(2,Pin.IN,Pin.PULL_UP),Pin(0,Pin.IN,Pin.PULL_UP)]
# set up the oled screen
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=100000)
display = ssd1306.SSD1306_I2C(128, 64, i2c)
while True:
w_val , b_val = buttons[0].value(), buttons[1].value()
print(f"white button value: {w_val}\nblack button value: {b_val}")
sleep(0.1)
print(buttons[0].value())