
On the world's largest river island, a boy discovers that even the smallest lights can turn darkness into magic.
Duration
3 sessions × 2 hours (6 hours total)
Track
12-Month Curriculum
Prerequisites
None
Materials
8 items needed
Prerequisites
No prior electronics experience required • Basic math (multiplication, simple fractions) • Curiosity about how living things produce light
The Dark Island
Every year, when the monsoon clouds swallowed the moon and the power lines sagged under the weight of rain, Majuli became the darkest place in the world — or so it seemed to Joon, a boy of nine who was afraid of the dark.
"It's just darkness," said his grandmother, stirring rice over a wood fire. "It can't bite."
"But it can swallow you," said Joon. "It swallowed the whole island tonight."
The First Light
That evening, Joon sat on the bamboo veranda, hugging his knees, when he saw it — a tiny green light, blinking on and off near the banana trees. Then another. Then ten. Then a hundred.
Fireflies.
They came from everywhere — from the reeds by the river, from the paddy fields, from the mango groves. Thousands of them, each one no bigger than a grain of rice, each one carrying its own small lamp.
"Aita!" Joon called to his grandmother. "Come look!"
His grandmother came to the veranda and smiled. "Ah," she said. "The firefly festival has begun."
The Grandmother's Story
"Long ago," said Aita, "when Majuli was young and the Brahmaputra was still deciding where to flow, the island had no lights at all. No lamps, no candles, no fire. The people lived in darkness every night."
"How did they see?" asked Joon.
"They didn't. They learned to listen instead. They could hear a snake in the grass from fifty steps away. They could tell the time by the sound of birds. But still, they wished for light."
"One night, a little girl named Junbiri caught a fallen star in her hands. But the star was too hot to hold, and it shattered into a million tiny pieces. Each piece became a firefly — a living spark, cool enough to touch, bright enough to see by."
"Junbiri didn't get one big light. She got a million small ones. And that," said Aita, "was even better."
The Boy's Discovery
Joon stepped off the veranda and walked into the cloud of fireflies. They landed on his arms, his hair, his shoulders. Each one pulsed with a light so gentle it felt like a heartbeat.
He held out his palm and a single firefly landed on it. Its glow was barely enough to see his own fingers. But when he looked up, the whole field was alive — a galaxy of green lights floating in the warm, wet air.
One firefly is almost nothing, Joon thought. But together, they've turned the whole island into a sky.
The Lesson
From that night on, Joon was never afraid of the dark again. Not because the darkness went away — but because he understood that you don't need to be a big light to matter. You just need to glow. And if enough small lights glow together, even the darkest island becomes beautiful.
Every monsoon, when the power goes out on Majuli, the fireflies still come. The children still run into the fields to watch. And somewhere, an old grandmother still tells the story of Junbiri and the shattered star.
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
# Simulating firefly synchronization
# Watch random flashers gradually sync up!
import random
fireflies = [random.uniform(0, 1) for _ in range(6)]
nudge = 0.05 # how much each adjusts toward neighbours
for step in range(20):
# Each firefly nudges toward the average
avg = sum(fireflies) / len(fireflies)
fireflies = [f + nudge * (avg - f) for f in fireflies]
spread = max(fireflies) - min(fireflies)
bar = "#" * int(spread * 50)
print(f"Step {step+1:2d}: spread={spread:.3f} {bar}")
# After 20 steps, spread → 0 = perfectly synced!This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Build a Firefly Jar.
By Level 4, enrolled students build: Build a Firefly Jar
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.
Fireflies produce light through a chemical reaction called bioluminescence. In this lesson, you'll understand the science behind living light — then build your own glowing circuits that mimic nature.
The big idea: "The Firefly Festival of Majuli" teaches us about LEDs, Circuits & Bioluminescence — and you don't need to write a single line of code to understand it.
Touch a light bulb that has been on for a few minutes. It is hot — painfully hot. That is because a regular bulb wastes 95% of its energy as heat and only turns 5% into light. Your bulb is mostly a heater that happens to glow a little.
Now imagine catching a firefly and holding it gently in your cupped hands. Its abdomen pulses with soft green light. But there is no heat at all. The firefly's body is cool to the touch. How is it making light without fire, without electricity, without getting hot?
The answer is a chemical reaction happening inside the firefly's belly. The firefly has a special molecule called luciferin (from the Latin word lux, meaning light). When luciferin meets oxygen from the air, and a helper molecule called luciferase brings them together, the reaction produces a tiny flash of yellow-green light. That is it — no flame, no wire, no heat. Just chemistry glowing in the dark.
Try this in your head: If a light bulb turns 5% of energy into light and a firefly turns 98% into light, how many times more efficient is the firefly? (Answer: about 20 times. The firefly wastes almost nothing.)
Scientists call this bioluminescence — 'bio' means living, 'luminescence' means light. The firefly is a living lamp, and it is far better at making light than anything humans have invented.
Key idea: Fireflies produce light through a chemical reaction (luciferin + oxygen → light), and they waste almost nothing as heat — 98% efficient compared to a light bulb's 5%.
A firefly does not just glow steadily like a night-light. It blinks — on, off, on, off — in a pattern. Why? Because each flash is a message.
Think about it this way. If you were standing on a hilltop at night and wanted to signal a friend across the valley, you would not just leave your torch on. You would flash it — maybe three short flashes for 'come here' or one long flash for 'I'm okay.' The pattern carries the meaning, not just the light.
Fireflies do exactly this, but for finding a mate. A male firefly flies through the air flashing a specific pattern — say, two quick flashes followed by a pause. A female of the same species, sitting on a leaf below, recognises the pattern and flashes back. If the pattern matches, he flies toward her. If it does not match, she ignores him.
Here is the clever part: there are over 2,000 species of firefly, and each species has its own unique flash code. They can all be in the same field at the same time without confusion, because each is tuned to its own signal — like different radio stations on different frequencies.
Check yourself: If a firefly just glowed steadily instead of flashing, what problem would that create? (Answer: every firefly would look the same — there would be no way to tell species apart, and no way to send or receive specific messages.)
Key idea: Fireflies flash in species-specific patterns to communicate — each pattern is a code, and only fireflies of the same species respond to each other's signals.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
In parts of Southeast Asia and the Smoky Mountains of the USA, something extraordinary happens: **thousands of fireflies flash in perfect unison**. On...
Humans wanted light without fire too. In 1962, an engineer named Nick Holonyak built the first practical **LED** — a Light Emitting Diode. An LED is a...
How a Firefly Makes Light