Skip to content

Flash code

MasBarr edited this page Oct 9, 2026 · 4 revisions

Step 4: Flash the code

4.1 Set up the Arduino IDE

  1. Install the Arduino IDE.
  2. Follow Adafruit's instructions to add support for the Feather M0 board.

4.2 Install the Tumbly library

  1. In the Arduino IDE, click Sketch → Include Library → Manage Libraries.
  2. Search for Tumbly.
  3. Click Install. If it asks, also install the dependencies.
Tumbly in the Library Manager

4.3 Upload the sketch

  1. Open File → Examples → Tumbly → Tumbly.

  2. Plug the Feather into your computer with a micro-USB data cable.

  3. Double-click the reset button on the Feather to put it in bootloader mode.

  4. Under Tools → Board, select Adafruit Feather M0.

    Board selection
  5. Click the Upload arrow.

    Upload button

The example sketch

You can leave the sketch as it is. Task, schedule, device ID, and door positions can all be changed on the device (see Step 6).

#include <Tumbly.h>

// Task options: "TimedDoor", "FreeFeeding", or "Demo"
String task = "TimedDoor";
bool darkMode = false;   // true = turn off screen and LED after the task starts
Tumbly tumbly(task, darkMode);

void setup() {
  tumbly.begin();
}

void loop() {
  tumbly.run();
}

← Step 3: Assemble the electronics | Next → Step 5: Assemble Tumbly

Clone this wiki locally