AI agents & screen readers: for a machine-readable, text-only catalogue, start at /llms.txt. Products are available as Markdown (/products.md, /products/{handle}.md) and JSON (/products.json, /products/{handle}.json).
Store
Make an EagLED button remember
Beginner 25 minutes

Turn a momentary press into a debounced, persistent on/off choice.

Turn a momentary press into a debounced, persistent on/off choice.

Designed for the intact EagLED v1.2 with buzzer. Start with USB power; no cutting or sewing is required.

View Markdown

Step 1 — Prepare the intact EagLED

Use an intact black EagLED v1.2 with buzzer, a micro-USB data cable and a computer. The LEDs, button and light sensor are already connected by PCB traces. You do not need jumper wires, a breadboard, external resistors or a separate Arduino.

Keep the board uncut for this project. Place it on a dry, non-conductive surface. Leave the battery socket empty, connect USB and move the main board switch to ON. Move the separate switch beside the buzzer to OFF for quiet LED and sensor experiments.

The 3D view follows this starter program and its controls. It illustrates the mechanism; it does not execute changes made in the code editor or measure a connected board.

Step 2 — Explore the result in 3D

Press and release the triangular button: the right star changes state once. Hold it for two seconds: the star should keep that state. A second fresh press changes it again. Drag to orbit, inspect a named component, and use Top or Underside to follow the real board layout.

Step 3 — Program your EagLED

The English IDE below opens with Little Bird EagLED and Arduino C++ selected. Read the English instructions beside the supplied program, then press Verify to compile it for this board.

To program your physical board, download the same sketch below and open it in Arduino IDE. Install the Little Bird AVR board package, choose Little Bird EagLED and its USB port, then Verify and Upload. Follow the EagLED setup guide if this is your first upload. Upload replaces the factory light pattern.

EagLED uses an ATmega32U4 at 8 MHz. Do not choose Uno or a 16 MHz Leonardo profile. Its USB port can change while the bootloader is active. If upload fails, check the selected port and retry after pressing the centre board’s reset button. The triangular project button is not reset. Close any browser serial connection before uploading from Arduino IDE.

Make an EagLED button rememberOpen in English ↗

Step 4 — Keep a copy of the complete program

eagled-toggle-3d.ino · Make an EagLED button remember ✦ English View Raw
const byte BUTTON_PIN = 2;
const byte STAR_PIN = 6;
const unsigned long DEBOUNCE_MS = 25;
bool rawLast = HIGH;
bool stable = HIGH;
bool starOn = false;
unsigned long changedAt = 0;
unsigned long reportedAt = 0;
void setup() {
  pinMode(BUTTON_PIN, INPUT_PULLUP);
  pinMode(STAR_PIN, OUTPUT);
  Serial.begin(9600);
}
void loop() {
  unsigned long now = millis();
  bool raw = digitalRead(BUTTON_PIN);
  if (raw != rawLast) { rawLast = raw; changedAt = now; }
  if (now - changedAt >= DEBOUNCE_MS && raw != stable) {
    stable = raw;
    if (stable == LOW) starOn = !starOn;
  }
  digitalWrite(STAR_PIN, starOn ? HIGH : LOW);
  if (now - reportedAt >= 50) {
    reportedAt = now;
    Serial.print("button:"); Serial.print(stable == LOW ? 1 : 0);
    Serial.print(",star:"); Serial.println(starOn ? 1 : 0);
  }
}

This is the same complete Arduino C++ program used by the English IDE. Copy it or download the .ino file.

Step 5 — Understand the program

starOn, stable, rawLast and the timestamps are outside loop(), so they survive between calls. raw and now are fresh on every pass. A mechanical button can bounce between readings during one press.

if (now - changedAt >= DEBOUNCE_MS && raw != stable) {
  stable = raw;
  if (stable == LOW) starOn = !starOn;
}

The first condition needs both 25 ms of stability and a change from the accepted state. && means both must be true. ! flips the Boolean choice. A held LOW is already accepted, so it cannot toggle repeatedly. The separate 50 ms timer limits serial output without blocking input checks.

Step 6 — Work through one case

TimeRaw D2Time unchangedAccepted stateStar
0HIGH—HIGHOff
100 msLOW0HIGHOff
125 msLOW25 msLOW (new press)On
2000 msLOW1900 msLOW (unchanged)On
2025 ms after releaseHIGH25 msHIGHOn

Step 7 — Test it on your board

Press and release the triangular button: the right star changes state once. Hold it for two seconds: the star should keep that state. A second fresh press changes it again.

Check the physical output after uploading. Successful compilation confirms syntax and board compatibility; the 3D illustration cannot confirm your board’s USB connection or electrical operation.

Step 8 — See readings from your real EagLED

After upload, open the serial connection here. The labelled values come from your actual board. Press and release the triangular button and compare the input with the LED state.

Step 9 — Predict, change and compare

First record a prediction for press → hold → release → press. Test it physically. Then change DEBOUNCE_MS to 250 and compare the response to a short tap and a half-second press. Keep the star pin and reporting interval fixed. Restore 25.

Check your reasoning after trying it

The state sequence is on → on → on → off. With 250 ms debounce, a tap shorter than 250 ms is intentionally ignored. Moving starOn inside loop() would reset the memory each pass and break the toggle.

Step 10 — Find and fix a problem

Several toggles per press: check you retained both raw != stable and the 25 ms stability test. Only toggles on release: check stable == LOW.

Nothing responds: check the main switch, the power indicator and a known data-capable USB cable. Confirm the EagLED board profile and USB port. If the board has already been snipped apart, its original connections are broken: follow a separate sewable wiring project before using this intact-board sketch.

Step 11 — Keep exploring

Continue through the EagLED experiments or open the full board explorer. The original EagLED schematic and manufacturing files document the pin connections.

Parts List

Required Parts (1)

EagLED - Little Bird E-Textile Snippable Board with Buzzer
EagLED - Little Bird E-Textile Snippable Board with Buzzer

Keep the board intact. Also bring a micro-USB data cable and computer. No additional sensor, LED, Arduino or breadboard is required.

x1

$34.35

In stock

Project Summary

1 part total

Required parts $34.35
Total (required) $34.35

Unavailable items will be skipped

Maddy, co-founder of Little Bird

Need help? We're here for you!

Hi, I'm Maddy. My team and I are ready to help with your order or any questions.