Uploading the KontroLIR Firmware
First, you should familiarize yourself with using the Arduino IDE to compile(verify) and upload sketches. Then simply follow the instructions below to upload the firmware to KontroLIR.
We have observed that there can be issue with the bootloader failing to activate when the MCU is in PWR_DOWN sleep mode (this is normal with the KontroLIR firmware loaded). So if you cannot get the bootloader to update the firmware from the Arduino IDE, there are 2 options, as follows:
- Press the KontroLIR buttons 1,3,7,9 in that order. The red LED will then start blinking for up to 30 seconds - indicating that it has not yet entered sleep mode. You can now proceed to upload the firmware using the Arduino IDE as normal. This sequence only behaves this way when powered from USB(5V). When operating from batteries this button sequence is ignored.
- When applying power for the first time, KontroLIR will blink the LED for up to 30 seconds to allow time for the bootloader to activate properly. Once you have supplied power to KontroLIR, you can immediately upload firmware using the Arduino IDE. This blinking after power on operates both when powered from USB & batteries.
- This note only applies when KontroLIR firmware is loaded or when the MCU is in sleep mode. It does not apply if the supplied Test firmware is loaded.
Steps to upload KontroLIR Firmware
- You will be provided a link to download the firmware source code, after purchasing your own KontroLIR remote control device, from our shop or an approved partner.
- Make sure you have installed and tested support for the ATmega328PB, into your Arduino IDE. (use the ATmega328PB core from watterott)
- Remove any batteries from KontroLIR and connect the Serial USB adapter to KontrolIR. (This USB adapter, requires a DTR or RTS pin to work - refer to pin out for firmware upload using the bootloader.)
- Make sure to follow the Getting Started instructions to verify correct operation of the ATmega328PB with your Arduino IDE, before proceeding to use KontroLIR firmware. The test suite also checks the hardware and is also explained in the Getting Started instructions.
- Insert the USB cable into the PC running the Arduino IDE.
- Select the correct COM port number of the serial USB adapter, in the Arduino IDE Tools->Port menu.
- Select clock speed of 4MHz for the KontroLIR firmware.
- Compile(verify) the firmware using the Arduino IDE.
- Upload the firmware to the KontrolIR device. (See note above about blinking LED. It is better to upload when the red LED is Blinking)
- Close the Arduino IDE.
Congratulations! - you are now ready to use the reference KontroLIR firmware. Of course the default signals provided will not necessarily work with your own equipment, but is an important first step.