Created
May 30, 2019 22:13
-
-
Save rbricheno/da259e7fe1009ef051dd67f17bb9b199 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from rak811 import Mode, Rak811 | |
import time | |
lora = Rak811() | |
lora.hard_reset() | |
lora.mode = Mode.LoRaWan | |
lora.band = 'EU868' | |
lora.set_config(dev_eui='xxxxxxxxxxxxxxxx', | |
app_eui='xxxxxxxxxxxxxxxx', | |
app_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') | |
lora.join_otaa() | |
lora.dr = 5 | |
while True: | |
lora.send('1') | |
time.sleep(30) | |
lora.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment