splitting things out for easier management of functions

barrier for the garage door stuff
com for xbee communications, send/receive etc
main is where the loop lives
spec is the dope library to decode the payload
This commit is contained in:
2022-01-02 11:15:14 -05:00
parent faf7e343db
commit 886f3c8d9f
4 changed files with 97 additions and 107 deletions

19
barrier.py Normal file
View File

@@ -0,0 +1,19 @@
import com
import xbee
from machine import Pin
class barrier:
moving = 0
position = 0
ad0 = Pin("D0", Pin.IN, Pin.PULL_UP)
ad1 = Pin("D1", Pin.IN, Pin.PULL_UP)
ad2 = Pin("D2", Pin.IN, Pin.PULL_UP)
ad4 = Pin("D4", Pin.OUT)
def status(seq,payload):
pass
def command(seq, payload):
pass
def watch(self):
pass