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 headerTrim the header to length if necessary and insert it (long pins down) into your breadboard. |
|
Position the BreakoutPlace 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:
|
|
Arduino Wiring:Connect jumpers from:
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).