Skip to content
Snippets Groups Projects
Commit e7435503 authored by LANGLAIS Charlotte's avatar LANGLAIS Charlotte
Browse files

modified: OTAA/main.py

parent a3135ee8
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,9 @@ def connect_to_ttn(lora_object):
pycom.heartbeat(False)
app_eui = ubinascii.unhexlify('0000000000000000')
app_key = ubinascii.unhexlify('1303DBC6209F8C44DFC1DF35471B9237') # replace the dash by the AppKey provided by TTN
app_key = ubinascii.unhexlify('----------------') # replace the dash by the AppKey provided by TTN
#uncomment to use LoRaWAN application provided dev_eui
dev_eui = ubinascii.unhexlify('70B3D54992CDBDD6') # replace the dash by the DevEUI provided to TTN
dev_eui = ubinascii.unhexlify('-----------------') # replace the dash by the DevEUI provided to TTN
pycom.rgbled(0xff0000) #red
time.sleep(1)
......@@ -56,7 +56,7 @@ for i in range (20):
s.send(pkt)
time.sleep(4)
# without downlink transmission first
rx, port = s.recvfrom(256)
if rx:
print('Received: {}, on port: {}'.format(rx, port))
time.sleep(6)
#rx, port = s.recvfrom(256)
#if rx:
# print('Received: {}, on port: {}'.format(rx, port))
#time.sleep(6)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment