Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CON
- _clkmode = xtal1 + pll16x
- _xinfreq = 5_000_000
- XB_Rx = 5 ' XBee DOUT
- XB_Tx = 6 ' XBee DIN
- XB_Baud = 9600
- CR = 13 ' Carriage Return value
- OBJ
- XB : "FullDuplexSerial"
- rc : "RCTime"
- Pub Start | UD, LR
- XB.start(XB_Rx, XB_Tx, 0, XB_Baud) ' Initialize comms for XBee
- waitcnt(clkfreq + cnt)
- repeat
- rc.rctime(0, 1, @LR)
- rc.rctime(1, 1, @UD)
- XB.Str(String("UD = "))
- XB.dec(UD)
- XB.Str(String(", LR = "))
- XB.dec(LR)
- XB.tx(13)
- waitcnt(clkfreq / 2 + cnt) ' 1/2 second delay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement