Introduction
Just like the animal, this lamp looks at the surface it is sitting on and automatically changes its own color to match. It runs continuously — sensing, processing, and adapting in real time.
The Chameleon Analogy
"A chameleon sits on a leaf and turns green. It moves to a red flower and turns red. Your lamp does the same thing — it reads the surface beneath it with a sensor, then smoothly fades its LED to match. It never stops watching."
What You'll Build
1. Continuous Sensing
The lamp constantly reads the color of the surface beneath it, adjusting automatically to lighting changes.
2. Smart Processing
Multiple readings are filtered, noise is removed, and the color is corrected for human eyes.
3. Change Detection
The lamp measures the "distance" between colors in 3D space to decide if the surface has actually changed.
4. Smooth Transitions
Instead of snapping between colors, the LED smoothly fades using a technique called linear interpolation.
Key Takeaway
What You'll Learn
Wiring
Connect the ESP8266 to the colour sensor (same circuit as Colour Picker).
How It Works
Understand the two-phase architecture: setup and continuous loop with 8 processing steps.
Concepts
Dive into 7 key concepts including color distance, black level correction, and lerping.