Custom Optiboot for Moteino

The Moteinos have an LED onboard. But it’s not on D13 as regular Arduinos, instead it’s on D9 (PWM pin, can be faded). I’d like the LED to flash when the bootloader starts and when Moteino is programmed from the Arduino IDE. So I rebuilt Optiboot for this purpose and all future orders for Moteinos will come with this tweaked Optiboot that will make use of the onboard LED when you reprogram it.

This is a video of how I program and test Moteinos before I ship them to you, also showing the updated Optiboot in action:

5 thoughts on “Custom Optiboot for Moteino

    • I made 3 changes:

      1) arduino-101\hardware\arduino\bootloaders\optiboot\optiboot.c:
      ADD: #define LED_DATA_FLASH 1
      CHANGE: #define LED_START_FLASHES 0 -> #define LED_START_FLASHES 3
      2) arduino-101\hardware\arduino\bootloaders\optiboot\pindefs.h:
      CHANGE: #define LED PINB5 -> #define LED PINB1

  1. What fuses and lock bits You seting for this bootloader?
    I am trying to build moteino on atmega 168. Set fuses h:dd l:ff ex:04. Bootloader dont start 🙁

    • Moteinos is loaded with a modified Optiboot bootloader to use the onboard LED on D9. Fuses: ext:FD, hi:DC, lo:DE.

Comments are closed.