from machine import Pin, PWM, SPI, I2C
from time import sleep, sleep_ms
from mfrc522 import MFRC522
import sdd1306
spi = SPI(
2,
baudrate=100000,
polarity=0,
phase=0,
sck=Pin(18),
mosi=Pin(23),
miso=Pin(19)
)
cs = Pin(5, Pin.OUT)
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
oled = sdd1306.SSD1306_I2C(128, 64, i2c)
servo = PWM(Pin(32), freq=50)
green = Pin(4, Pin.OUT)
buzzer = Pin(15, Pin.OUT)
authorized_uid = "11:33:44:00"
occupied = False
Loading
mfrc522
mfrc522