barrier exists and is doing a watch for status change on pins 0 and 1 main is starting to add in the new cluster at endpoint 8 on interview com is where fancy_transmit is now
17 lines
522 B
Python
17 lines
522 B
Python
import time
|
|
import xbee
|
|
def receive():
|
|
return xbee.receive()
|
|
|
|
def fancy_transmit(payload, source_ep, dest_ep, cluster,profile):
|
|
send = 0
|
|
while send == 0:
|
|
try:
|
|
if xbee.transmit(xbee.ADDR_COORDINATOR, payload, source_ep=source_ep, dest_ep=dest_ep, cluster=cluster, profile=profile,
|
|
tx_options=0) is None:
|
|
send = 1
|
|
#time.sleep(1)
|
|
except OSError as e:
|
|
time.sleep(1)
|
|
print(payload)
|
|
print(e) |