IoT Developer Kit Environment Setup
All Losant IoT Developer Kits use an ESP8266 based WiFi development board. Before you can flash the required firmware to these devices, you must setup your environment with the proper development tools. The below instructions will walk you through installing all necessary 3rd party tools. These instructions only need to be followed once, and the same environment can be used for all Losant IoT developer kits.
Install Arduino IDE
Download and install v1.8.7 of the Arduino IDE by following the instructions at:
If you already have the Arduino IDE installed, it is strongly recommend that you download and install 1.8.7. There have been issues with previous versions not working correctly.
Install USB Drivers
The microcontroller boards requires the USB to UART driver to be installed in order to program it. Download and install the driver for your platform by following the instructions at:
On a Mac, the above link downloads a disk image. Double-click the file to mount it, open the disk image, then double-click the .pkg file to install the driver.
Configure Arduino IDE
Launch the Arduino IDE. Linux users typically have to open the IDE under sudo for correct permissions. In order for the board to show up as a board in Arduino, you must add the following to the “Additional Boards Manager URLs” field in the preferences. On a Mac, the preferences can be found at
Arduino -> Preferences.
Restart the Arduino IDE.
Open the Board Manager at
Tools -> Board -> Boards Manager. Change the Type field to
Contributed and enter
esp8266 in the Search field. Select the ESP8266 entry in the list, change the version to 2.4.2, and click the
Restart the Arduino IDE again. We can now configure the Arduino IDE to use the board we just installed.
Open the Arduino IDE, select the Tools menu, and change the Board to
Generic ESP8266 Module.
After selecting the board, additional options will appear in the Tools menu. Ensure the other options are set to the following; the bolded options typically need changed from their defaults.
- Flash Mode = QIO
- Flash Frequency = 40MHz
- CPU Frequency = 80MHz
- Flash Size = 4M 1M SPIFFS
- Reset Method = nodemcu
- Upload Speed = 115200
The following workshops require a few dependencies to be installed. The first two libraries can be installed using Arduino's Library Manager. Open the manager from the
Sketch -> Include Library -> Manage Libraries menu.
The first required library is PubSubClient. Type that in the filter field, select the entry in the list and install the latest version.
The next library is ArduinoJson. Repeat the the same process again, and install the latest version of ArduinoJson.
The last library is the Losant Arduino MQTT Client. We'll include this library as a zip file. Download the zip from the following URL and save it somewhere convenience on your computer. You'll use this file in the next step.
Next, add the zip you just downloaded to your libraries using the
Sketch -> Include Library -> Add .ZIP Library menu.
This will open a file browser. Simply select the zip you just downloaded.
Configure Device USB Port
If you don't have a microcontroller yet, you can skip this step and return to it when you have the device.
Remove the microcontroller from the foam (if needed), and connect it to your computer with the supplied USB cable.
Tools -> Port menu to select the port your device is connected to. This will change depending on your operating system. On a Mac, it’s always named
SLAB_USBtoUART. On Windows it will be named
Com and then a number, for example
If you don't see an entry under the port menu, double check the following:
- Did you install the USB driver?
- Did you connect the microcontroller to your computer with the supplied USB cable?
Your environment is now properly setup to begin programming your dev kits with their needed firmware. Please continue to the instructions for your specific kit.