Skip to content
Project: Chameleon Lamp

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

Unlike the Colour Picker (which scans once on command), the Chameleon Lamp runs in a continuous loop — always watching, always adapting. This introduces new concepts like change detection and smooth transitions.

What You'll Learn

01

Wiring

Connect the ESP8266 to the colour sensor (same circuit as Colour Picker).

02

How It Works

Understand the two-phase architecture: setup and continuous loop with 8 processing steps.

03

Concepts

Dive into 7 key concepts including color distance, black level correction, and lerping.