Skip to content
Module: Hardware

Wiring

The Colour Picker uses just four wires to connect the ESP8266 microcontroller to the TCS34725 colour sensor via the I2C protocol.

Circuit Diagram

Circuit diagram showing ESP8266 connected to colour sensor

The 4 Connections

Vin (Power)

Supplies voltage to the colour sensor. Connect ESP8266 Vin to Sensor Vin.

GND (Ground)

Completes the circuit. Connect ESP8266 GND to Sensor GND.

D1 → SDA (Data)

The "talking" wire where actual color data travels back and forth between the sensor and the microcontroller.

D2 → SCL (Clock)

The "metronome" wire that keeps the sender and receiver perfectly in sync.

Quick Reference

ESP8266Colour Sensor
VinVin
GNDGND
D1SDA
D2SCL

Note

Always double-check your wiring before powering on! Swapping SDA and SCL is the most common mistake and the sensor simply will not respond.

Tip

These two wires (SDA and SCL) use a protocol called I2C. Want to understand how devices talk on a shared bus? Check out the I2C module in the main Candy Sorter course!