Assembly and Wiring

Both color sensors come with all surface mount components pre-soldered. The breakout-board version comes with an optional header for breadboard use. Soldering the header is a simple process:

Assembly (breakout version only)

Position the header

Trim the header to length if necessary and insert it (long pins down) into your breadboard.

Position the Breakout

Place the breakout over the exposed short end of the header pins.

And Solder!

Solder all pins to ensure good electrical contact.

Wiring

These sensors communicate via a 2-wire I2C interface. To connect to the processor, you need a total of just 4 wires.

Flora Wiring:

Connect from:
  • 3.3v -> 3v (red wire)
  • GND -> GND (black wire)
  • SDA -> SDA (white wire)
  • SCL -> SCL (green wire)

Arduino Wiring:

Connect jumpers from:
  • 5v -> VIN (red wire)
  • GND -> GND (black wire)
  • SDA -> SDA (orange wire)
  • SCL -> SCL (white wire)
Note: On older Arduinos such as the Duemilanove and pre R3 UNOs, SDA is on Analog 4 and SCL is on Analog 5.

On pre-R2 Megas, SDA is on Digtital 20 and SCL is on digital 21.

For the Leonardo, SDA is digital pin 2 and SCL is digital pin 3.

To control the LED

(Breakout version only) - The LED pin can be pulled low to turn off the LED. This can be done in three ways:
  1. Wire directly to ground to turn it off completely.
  2. Wire to a spare digital pin and control it with digitalWrite().
  3. Wire the LED pin to the INT pin and control with setInterrupt() (See Library Reference for details).
Last updated on May 04, 2015 Published on May 21, 2013