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
Measure light with EagLED
Beginner 25 minutes

Read the on-board phototransistor and compare ADC counts with approximate voltage.

Read the on-board phototransistor and compare ADC counts with approximate voltage.

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

Move Light level in the model. On the real board, cover the small sensor on the right-hand triangle, then uncover it. Record which way the ADC reading changes. 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.

Measure light with EagLEDOpen in English ↗

Step 4 — Keep a copy of the complete program

eagled-light-3d.ino · Measure light with EagLED ✦ English View Raw
const byte LIGHT_PIN = A9;
const float REFERENCE_V = 3.3;
void setup() { Serial.begin(9600); }
void loop() {
  int light = analogRead(LIGHT_PIN);
  float volts = light * (REFERENCE_V / 1023.0);
  Serial.print("light:"); Serial.print(light);
  Serial.print(",volts:"); Serial.println(volts, 3);
  delay(100);
}

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

The ALS-PT19 is a phototransistor. With its on-board 10 kΩ resistor, it produces a voltage that increases with light. The ADC converts that voltage into an integer from 0 to 1023. A9 selects the analog input also available at sewing pad #9.

int light = analogRead(LIGHT_PIN);
float volts = light * (REFERENCE_V / 1023.0);

A floating-point divisor, 1023.0, retains fractional voltage. The 3.3 V reference is an approximation to the board supply, so this is not a precision voltmeter. Sensor response and room conditions vary; no calibration converts this sketch into a lux meter.

Step 6 — Work through one case

ADC countCalculationApproximate voltage
00 × 3.3 / 10230 V
512512 × 3.3 / 10231.65 V
10231023 × 3.3 / 10233.30 V

The 100 ms delay gives about ten reports each second. No while(!Serial) gate is used, so a disconnected monitor will not hold the program forever.

Step 7 — Test it on your board

Move Light level in the model. On the real board, cover the small sensor on the right-hand triangle, then uncover it. Record which way the ADC reading changes.

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. A9 readings are 10-bit ADC counts (0–1023), not lux; voltage uses an approximate 3.3 V reference.

Step 9 — Predict, change and compare

Keep the board in one place. Record five readings uncovered and five while covered by the same opaque card; compute each average. Predict a reading for partial cover and test it. Explain why a halfway shadow need not give exactly half the ADC count.

Check your reasoning after trying it

Light geometry, phototransistor response and the ADC’s saturation limit affect the reading. Full scale means the input is near the reference voltage; it does not identify an exact maximum lux level. Repeat under the same conditions to compare fairly.

Step 10 — Find and fix a problem

Reading remains near 1023: shade the sensor; strong light can saturate it. Reading does not change: confirm A9 rather than A0 and cover the right triangle’s small clear sensor, not an eye LED.

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.