17 lines
309 B
Python
17 lines
309 B
Python
from machine import Pin
|
|
import src.slave as slave
|
|
import src.wireless as wireless
|
|
import src.data as data
|
|
|
|
|
|
wireless.espnow_setup()
|
|
|
|
if data.master:
|
|
# server has autostart in another _thread
|
|
import src.server as server
|
|
Pin(2, Pin.OUT).value(1)
|
|
else:
|
|
Pin(2, Pin.OUT).value(1)
|
|
slave.loop()
|
|
|