Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. c=1
  2. while True:
  3. akpl_buf = [c,1, 2, 3,4,5,6,7,8,9,0,1, 2, 3,4,5,6,7,8]
  4. pipe = [0]
  5. # wait for incoming packet from transmitter
  6. while not radio.available(pipe):
  7. time.sleep(10000/1000000.0)
  8.  
  9. recv_buffer = []
  10. radio.read(recv_buffer, radio.getDynamicPayloadSize())
  11. print recv_buffer
  12. c = c + 1
  13. if (c&1) == 0: # queue a return payload every alternate time
  14. radio.writeAckPayload(1, akpl_buf, len(akpl_buf))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement