-
1Clone the repository:
git clone -b LoRaWAN https://github.com/lemariva/uPyLoRaWAN.git
-
2Rename the file ttn_config.sample.py to ttn_config.py. Inside this file, you need to define the following variables:
DEVADDR: Device Address NWKEY: Network Session Key APP: App Session Key
You get these values, from the TTN console, when you register a new device under an application, as explained in the next section. Inside the
main.py
change also thedevice_pins
dictionary to the corresponding of your board. Finally, the variablepayload
is the data that will be sent. -
3Upload the code using VSCode and the PyMark extension to the ESP32 running MicroPython.
You can follow this tutorial to install these tools: MicroPython: Visual Studio Code as IDE.
-
4A guide for the TTN configuration
Visit this link: #Tutorial: ESP32 running MicroPython sends data over LoRaWAN
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.