Advertisement
Atdiy

Untitled

Mar 11th, 2012
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. CON
  2. _clkmode = xtal1 + pll16x
  3. _xinfreq = 5_000_000
  4.  
  5. XB_Rx = 0 'XBee DOut
  6. XB_Tx = 1 'XBee DIn
  7. XB_Baud = 9600 'XBee Baud Rate
  8.  
  9. PC_Rx = 31
  10. PC_Tx = 30
  11. PC_Baud = 9600
  12.  
  13. PB = 7
  14.  
  15. CR = 13
  16.  
  17. OBJ
  18. XB : "XBee_Object_2"
  19.  
  20. Pub Start | State, tInc, tCw, tCcw
  21. XB.start(XB_Rx, XB_Tx, 0, XB_Baud)
  22.  
  23. repeat
  24. if ina[PB] == 1
  25. State := 1300
  26. else
  27. State := 1700
  28.  
  29. XB.Tx("!")
  30. XB.Dec(State)
  31. XB.CR
  32. XB.Delay(500)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement