This repository includes example software to be used with the KISS LoRa gadget from the E&A fair.
Download the contents of this repository to your computer by clicking here or by going to Clone or download->Download ZIP. On your computer unzip the downloaded file by following the correct procedure for your operating system.
Download the latest version of the Arduino IDE from https://www.arduino.cc/en/Main/Software.
If your Arduino IDE's interface language is not English, you can change it using the following steps:
Dutch: Bestand->Voorkeuren->Taal voor editor->Engels(Engels), hierna Arduino IDE opnieuw opstarten.
Go to File->Preferences on the Settings tab, next to Show verbose output during:, make sure the checkbox next to upload is selected.
Install the USB drivers for the SparkFun boards, following the steps for Windows or for Linux and Mac.
In the Arduino IDE go to File->Preferences->Additional Boards Manager URLs and add:
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
Go to Tools->Board->Boards Manager, search for SparkFun AVR Boards and click on install.
Go to Tools->Board and select SparkFun Pro Micro.
Go to Tools->Processor and select ATmega32U4 (3.3V, 8MHz).
Go to Sketch->Include Library->Manage Libraries.
Search for TheThingsNetwork and click on install.
Search for SoftPWM and click on install.
The serial monitor must be closed before uploading code to the device.
- Switch the KISS LoRa device off.
- Plug it into your computer using a micro USB cable.
- In the Arduino IDE make sure the correct Tools->Board (SparkFun Pro Micro) and Tools->Processor (ATmega 32U4, 8MHz) are selected.
- Switch the device on and make sure the correct Tools->Port is selected.
- Switch the device off again.
- Press and hold the Push Button on the kiss device.
- In the Arduino IDE, choose Sketch->Upload.
- As soon as you see
PORTS {} / {} => {}
printed in the output window turn KISSLoRa on. - When the upload process continue past showing
PORTS {} / {} => {}
, you can release the push button.
It is common to have problems while trying to program Arduino devices, including the KISS LoRa device. In case you experience some issues, a simple Google search will most likely help to find a solution. Some common problems and fixes are listed here:
If you are using Linux, read this.
If you are using MAC OS, read this.
In the directory KISSLoRa-demo_app you will find the original firmware that was on the KISS LoRa device when you received it. If you ever want to flash this firmware back onto the device, have a look at the README.md in this directory.
In the Bootloader directory you will find the hex file for the bootloader that runs on your KISS LoRa device. In the most cases you will never need this, but if you manage to brick your device, this will be useful to recover.
The Schematics directory contains the electronic design of the board. It specifically shows how everything is connected. This is useful to have when writing firmware for the KISS LoRa device, to know on which pins the sensors are connected.
The schematic uses the pin names and numbers from the datasheet of the ATmega32u4. When programming this board from within Arduino IDE, we use the Arduino pin names and numbers. See the PIN_MAPPING document for the translation between these pin numbers and names.
In the Examples directory you will find example firmware files to read the sensors on the board. Have a look at the README in each subdirectory to see an explanation of each example.