2024-01-30 20:04:56 +01:00
|
|
|
from machine import Pin
|
2024-04-25 13:15:27 +02:00
|
|
|
import src.server as server
|
2024-01-30 20:04:56 +01:00
|
|
|
import src.slave as slave
|
|
|
|
import src.wireless as wireless
|
|
|
|
import src.data as data
|
|
|
|
|
|
|
|
|
|
|
|
wireless.espnow_setup()
|
|
|
|
|
|
|
|
if data.master:
|
2024-04-25 13:15:27 +02:00
|
|
|
server.start()
|
2024-01-30 20:04:56 +01:00
|
|
|
Pin(2, Pin.OUT).value(1)
|
|
|
|
else:
|
2024-04-25 13:15:27 +02:00
|
|
|
slave.loop(Pin(2, Pin.OUT).value(1))
|
2024-01-30 20:04:56 +01:00
|
|
|
|