-
Notifications
You must be signed in to change notification settings - Fork 2
2. Programming
You can program the μNode using Arduino. The steps you need to follow are:
-
Make sure you $have installed Arduino IDE 1.8.6 or newer (important)
-
Go to Arduino Preferences
-
Append the following link on the “Additional Boards”
http://arduino.esp8266.com/stable/package_esp8266com_index.json
-
Open the “Boards Manager”
-
Search for the esp8266 board and install the version 2.4.2. Currently the μNode library only supports this version
-
Select Generic ESP8266 Module as the target board
-
Select Flash Mode : DIO
-
Select Flash Size : 4M (1M SPIFFS)
-
Download the latest uNode version from the releases page and install it using Install Library -> From Zip File.
-
You can now load one of the examples that came with the library from File -> Examples -> uNode -> Blink to get started.
- The example sketch that you loaded is the simplest sketch possible. It is not using the LoRa radio and it’s just blinking the built-in LED. Click the Verify button. It should compile without errors.
-
You will also need to have python 2.7 installed on your machine (version 3.x is not supported but both versions can co-exist).
Note: Windows users should select “Add python.exe to Path” (see below – this option is not selected by default).
-
Press the RESET button on the board 3 times until you see 5 rapid blinks on the blue led. You are now in OTA WiFi Mode.
In this mode, your μNode becomes a wireless access point and you can update it’s firmware by connecting on it. Keep in mind that it will take ~10 seconds until the access point is ready.
-
Connect to the WiFi network named
TLAB_UNODE_XXXXX
-
Wait a few seconds and you will soon see that a new “Port” will appear on the Arduino IDE. Select the new “unode at 192.168.4.1” port from the Tools menu.
-
Click the Upload button
-
Wait for the message “Done Uploading” to confirm. The uNode is now flashed and will soon be rebooted with the new firmware.
⚠️ WARNING: Do not power off the device right away! Wait until you see a faint blink on the blue led (after about 5~10 seconds) then you are safe to power it off.
-
Press the RESET button on the board 3 times until you see 5 rapid blinks on the blue led. You are now in OTA WiFi Mode.
In this mode, your μNode becomes a wireless access point and you can update it’s firmware by connecting on it. Keep in mind that it will take ~10 seconds until the access point is ready.
-
Connect to the WiFi network named
TLAB_UNODE_XXXXX
-
Open your browser and visit http://unode.local or http://192.168.4.1.
-
Select the firmware
.bin
file that you have obtained and click Upload . -
When ready, the device will reboot with the new firmware.
-
Connect your FTDI serial adapter to your USB cable and place it on the board as shown below.
-
You can either press the connector against the board or, if you are planning to use it frequently (eg. for debugging), you can solder some pin sockets to easily plug your adapter.
-
Connect the RTS pin of the TFTDI board to the RST pin on the μNode
-
Select the serial port where your adapter is connected.
-
Click the Upload button
The uNode will be flashed with the new firmware and will be rebooted after completion. If you have trouble flashing the board refer to the 3. Troubleshooting section.