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:
19
barrier.py
Normal file
19
barrier.py
Normal 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
|
||||
Reference in New Issue
Block a user