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.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)
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:- Wire directly to ground to turn it off completely.
- Wire to a spare digital pin and control it with digitalWrite().
- Wire the LED pin to the INT pin and control with setInterrupt() (See Library Reference for details).
Page last edited May 14, 2013
Text editor powered by tinymce.