# Festive Feather Holiday Lights

## Overview

https://youtu.be/XjWElHjqNTw

Spice up your holiday decorations using [Adafruit's Feather boards](https://www.adafruit.com/category/777)&nbsp;to add interactivity in a tiny package. &nbsp;Feathers are little&nbsp;Arduino-compatible microcontrollers that give you all the functionality of a full-size Arduino in a much smaller and battery-friendly package. &nbsp;

You can put&nbsp;a Feather into almost any project, like these festive holiday lights that animate and change color at your command. &nbsp;The [32u4 Feather](https://www.adafruit.com/product/2771)&nbsp;combined with a [color](https://www.adafruit.com/product/1334)&nbsp;and [proximity](https://www.adafruit.com/product/466)&nbsp;sensor lets you change the color of holiday lights by holding up a brightly colored object to them. &nbsp;The [Bluefruit LE Feather](https://www.adafruit.com/product/2829)&nbsp;lets you change the color of lights using a smartphone or tablet and the Bluefruit LE app. &nbsp;Your holiday decorations will be full of joy with Adafruit's Feathers!

![](https://cdn-learn.adafruit.com/assets/assets/000/029/276/medium800/leds_IMG_4397.jpg?1450808897)

To build these projects you'll want to be familiar with the basics of Arduino. &nbsp;Check out these guides for some background information:

- [Learn Arduino Series](../../../../series/learn-arduino)
- [Adafruit Arduino IDE Setup](../../../../adafruit-arduino-ide-setup/overview)

You'll also need to do a little bit of soldering to assemble Feather boards. &nbsp;If you're new to soldering be sure to see the [guide to excellent soldering](../../../../adafruit-guide-excellent-soldering/tools).

Finally for Bluetooth Low Energy it will help to skim&nbsp;these guides for some background information:

- [Introduction to Bluetooth Low Energy](../../../../introduction-to-bluetooth-low-energy/introduction)
- [Bluefruit LE Connect for iOS](../../../../bluefruit-le-connect-for-ios/settings)

# Festive Feather Holiday Lights

## Color Sensing Lights

![](https://cdn-learn.adafruit.com/assets/assets/000/029/261/medium800/leds_IMG_4400.jpg?1450800941)

These holiday lights change their color when you hold an object up to them. &nbsp;A proximity sensor detects when an object is near, and a color sensor detects the object's color so the lights can change to match it--like a chameleon!

# Parts

To build these lights you'll need the following parts:

- **[32u4 Feather](https://www.adafruit.com/product/2771)**
- **[VCNL4010 Proximity Sensor](https://www.adafruit.com/products/466)**
- **[TCS34725 Color Sensor](https://www.adafruit.com/products/1334)**
- **[NeoPixels](https://www.adafruit.com/category/168)**

  - You can use a strip, ring, matrix, or even bare pixels. &nbsp;Just make sure your power supply can handle all the pixels you intend to use!

- **5V Power Supply**

  - I recommend the [5 volt 10 amp supply](https://www.adafruit.com/product/658)&nbsp;as it can handle lighting up to about 150 NeoPixels. &nbsp;Remember each pixel can take up to 60mA alone! &nbsp;Also a [DC power jack terminal adapter](https://www.adafruit.com/products/368)&nbsp;makes it easy to connect a power supply to the circuit.

- **[Breadboard](https://www.adafruit.com/product/64)**, **[jumper wires](https://www.adafruit.com/product/153)**, and **[soldering tools](https://www.adafruit.com/product/136)**.

# Wiring

First follow the guide for each component to assemble and test it:

- [Adafruit 32u4 Feather Guide](../../../../adafruit-feather-32u4-basic-proto/overview)
- [Adafruit TCS34725 Color Sensor Guide](../../../../adafruit-color-sensors/overview)
- [Adafruit VCNL4010&nbsp;Product Page](https://www.adafruit.com/products/466)

Then wire up the components as shown below:

![](https://cdn-learn.adafruit.com/assets/assets/000/029/263/medium800/leds_32u4_color_sense_bb.png?1450801037)

- Connect **power supply ground** to **32u4 Feather ground** , **TCS34725 ground** , **VCNL4010 ground** , and **NeoPixel ground**.
- Connect **power supply 5V** to **32u4 Feather USB pin** , **TCS34725 VDD pin** , **VCNL4010 VIN pin** , and **NeoPixel +5V**.
- Connect **32u4 Feather SCL** to **TCS34725 SCL** , **VCNL4010 SCL**.
- Connect **32u4 Feather SDA** to **TCS34725 SDA** , **VCNL4010 SDA**.
- Connect **32u4 Feather pin 5** to **TCS34725 LED pin**.
- Connect **32u4 Feather pin 6** to **NeoPIxel signal input (Din)**.

# Sketch

Before loading the sketch make sure you have the following libraries installed. &nbsp;Remember you can use the [Arduino library manager](https://www.arduino.cc/en/Guide/Libraries)&nbsp;to easily search for and install them:

- [Adafruit TCS34725 Library](https://github.com/adafruit/Adafruit_TCS34725)
- [Adafruit NeoPixel Library](https://github.com/adafruit/Adafruit_NeoPixel)

Next download the sketch from its&nbsp;[home on GitHub](https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/Feather_Holiday_Lights)&nbsp;which contains five files under the&nbsp; **Feather\_32u4\_Lights** &nbsp;folder:

- [Adafruit\_VCNL4000.cpp](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_32u4_Lights/Adafruit_VCNL4000.cpp "Adafruit\_VCNL4000.cpp")
- [Adafruit\_VCNL4000.h](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_32u4_Lights/Adafruit_VCNL4000.h "Adafruit\_VCNL4000.h")
- [Adafruit\_VCNL4010.cpp](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_32u4_Lights/Adafruit_VCNL4010.cpp "Adafruit\_VCNL4010.cpp")
- [Adafruit\_VCNL4010.h](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_32u4_Lights/Adafruit_VCNL4010.h "Adafruit\_VCNL4010.h")
- [Feather\_32u4\_Lights.ino](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_32u4_Lights/Feather_32u4_Lights.ino "Feather\_32u4\_Lights.ino")

Click **Download: Project Zip** in the main code window below.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Feather_Holiday_Lights/Feather_32u4_Lights/Feather_32u4_Lights.ino

Load the **Feather\_32u4\_Lights** sketch in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/275/medium800/leds_32u4_arduino.png?1450808010)

Near the top of the sketch are **#define** values that you can adjust for&nbsp;your light configuration:

- **PIXEL\_COUNT** - Set this to the number of NeoPixels you're using.
- **PIXEL\_PIN** - Set this to the pin connected to the NeoPixel input (pin 6 if you followed the wiring).
- **PIXEL\_TYPE** - Set this to the type of NeoPixel. &nbsp;Use the default unless you know you're using a different type of NeoPixel (see the strandtest example in the NeoPixel library for more information on types of NeoPixels).
- **ANIMATION\_PERIOD\_MS** &nbsp;- This is the amount of time a single animation frame takes (in milliseconds). &nbsp;Adjust this to slow down and speed up the animation.
- **TCS\_LED\_PIN** - Set this to the digitial pin connected to the TCS color sensor LED pin (pin 5 if you followed the wiring).
- **PROXIMITY\_THRESHOLD** - This is the proximity value that's used to consider an object close enough to read its color with the TCS sensor. &nbsp;You can tune this by looking at the serial monitor output to see the stream of proximity values and adjusting the threshold to be near the values you see when an object is near the sensor.

You can also adjust a part of the code depending on if you're using a VCNL4010 or older VCNL4000 proximity sensor:

```auto
// Create VCNL sensor object (defined in this sketch).
// If you're using a VCNL4010 sensor use this line:
Adafruit_VCNL4010 vcnl = Adafruit_VCNL4010();
// However if you're using a VCNL4000 sensor comment the above line and uncomment this one:
//Adafruit_VCNL4000 vcnl = Adafruit_VCNL4000();
```

Warning: 

Now load the sketch on your hardware, then open the serial monitor at 115200 baud. &nbsp;You should see proximity measurement values printed continuously to the console. &nbsp;

Move a colored object right above the VCNL and TCS color sensor. &nbsp;If the proximity value crosses the threshold the TCS sensor's LED will turn on and read the color of the object. &nbsp;The sensor will wait about a second for you to remove the object, then the lights will start to animate using the color of the object.

Woo hoo, that's all there is to the 32u4 Feather Color Sensing Holiday Lights project! &nbsp;This project is great for coloring lights on the tree using brightly wrapped gifts.

# Festive Feather Holiday Lights

## Bluetooth Low Energy Lights

![](https://cdn-learn.adafruit.com/assets/assets/000/029/262/medium800/leds_IMG_4403.jpg?1450800961)

These holiday lights can be controlled right from your smartphone or tablet. &nbsp;Just open the Bluefruit LE app and use its color picker to choose the best color for any celebration.

# Parts

To build these lights you'll need the following parts:

- **[Bluefruit LE Feather](https://www.adafruit.com/product/2829)**
- **[NeoPixels](https://www.adafruit.com/category/168)**

  - You can use a strip, ring, matrix, or even bare pixels. &nbsp;Just make sure your power supply can handle all the pixels you intend to use!

- **5V Power Supply**

  - I recommend the [5 volt 10 amp supply](https://www.adafruit.com/product/658)&nbsp;as it can handle lighting up to about 150 NeoPixels. &nbsp;Remember each pixel can take up to 60mA alone! &nbsp;Also a [DC power jack terminal adapter](https://www.adafruit.com/products/368)&nbsp;makes it easy to connect a power supply to the circuit.

- **[Breadboard](https://www.adafruit.com/product/64)**, **[jumper wires](https://www.adafruit.com/product/153)**, and **[soldering tools](https://www.adafruit.com/product/136)**.

# Wiring

First follow the guide for each component to assemble and test it:

- [Adafruit Bluefruit LE Feather Guide](../../../../adafruit-feather-32u4-bluefruit-le)

Then wire up the components as shown below:

![](https://cdn-learn.adafruit.com/assets/assets/000/029/264/medium800/leds_ble_feather_bb.png?1450801073)

- Connect **power supply ground** to **Bluefruit LE&nbsp;Feather ground** &nbsp;and **NeoPixel ground**.
- Connect **power supply 5V** to **Bluefruit LE Feather USB pin** &nbsp;and **NeoPixel +5V**.
- Connect **Bluefruit LE Feather pin 6** to **NeoPIxel signal input (Din)**.

# Sketch

Before loading the sketch make sure you have the following libraries installed. &nbsp;Remember you can use the [Arduino library manager](https://www.arduino.cc/en/Guide/Libraries)&nbsp;to easily search for and install them:

- [Adafruit Bluefruit nRF51](https://github.com/adafruit/Adafruit_BluefruitLE_nRF51)
- [Adafruit NeoPixel Library](https://github.com/adafruit/Adafruit_NeoPixel)

Next download the sketch from its&nbsp;[home on GitHub](https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/Feather_Holiday_Lights)&nbsp;which contains **three** files under the&nbsp; **Feather\_BluefruitLE\_Lights** &nbsp;folder:

- [BluefruitConfig.h](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_BluefruitLE_Lights/BluefruitConfig.h "BluefruitConfig.h")
- [Feather\_BluefruitLE\_Lights.ino](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_BluefruitLE_Lights/Feather_BluefruitLE_Lights.ino "Feather\_BluefruitLE\_Lights.ino")
- [packerParser.cpp](https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/Feather_Holiday_Lights/Feather_BluefruitLE_Lights/packerParser.cpp "packerParser.cpp")

Click **Download: Project Zip** in the main code window below.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Feather_Holiday_Lights/Feather_BluefruitLE_Lights/Feather_BluefruitLE_Lights.ino

Unzip the archive and load the **Feather\_BluefruitLE\_Lights** sketch in the Arduino IDE.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/273/medium800/leds_ble_arduino.png?1450807238)

Near the top of the sketch are **#define** values that you can adjust to suite your light configuration:

- **PIXEL\_COUNT** - Set this to the number of NeoPixels you're using.
- **PIXEL\_PIN** - Set this to the pin connected to the NeoPixel input (pin 6 if you followed the wiring).
- **PIXEL\_TYPE** - Set this to the type of NeoPixel. &nbsp;Use the default unless you know you're using a different type of NeoPixel (see the strandtest example in the NeoPixel library for more information on types of NeoPixels).
- **ANIMATION\_PERIOD\_MS** &nbsp;- This is the amount of time a single animation frame takes (in milliseconds). &nbsp;Adjust this to slow down and speed up the animation.

Upload the sketch to your hardware and you should see the lights turn on and animate with a red color. &nbsp;Now use the Bluefruit LE app on an [iOS](../../../../bluefruit-le-connect-for-ios/settings)&nbsp;or [Android](https://play.google.com/store/apps/details?id=com.adafruit.bluefruit.le.connect&hl=en)&nbsp;device and connect to the Bluefruit Feather in **Controller** mode. &nbsp;Use the **Color Picker** to pick a color and **send** it to the Bluefruit--woo hoo, the lights will change color! &nbsp;

Check out the [Bluetooth NeoPixel Goggles project](../../../../bluetooth-neopixel-goggles/overview)&nbsp;for a little more explanation about using the color picker.

That's all there is to the Bluefruit LE Feather holiday light project! &nbsp;Use the color picker on your phone/table to control your holiday lights with ease!


## Featured Products

### Adafruit Feather 32u4 Basic Proto

[Adafruit Feather 32u4 Basic Proto](https://www.adafruit.com/product/2771)
 **Feather** is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

**This is the&nbsp;Feather 32u4 Basic Proto,** it has a bunch of...

In Stock
[Buy Now](https://www.adafruit.com/product/2771)
[Related Guides to the Product](https://learn.adafruit.com/products/2771/guides)
### Adafruit Feather 32u4 Bluefruit LE

[Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829)
Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather 32u4 Bluefruit** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2829)
[Related Guides to the Product](https://learn.adafruit.com/products/2829/guides)
### Adafruit Feather M0 Basic Proto - ATSAMD21 Cortex M0

[Adafruit Feather M0 Basic Proto - ATSAMD21 Cortex M0](https://www.adafruit.com/product/2772)
Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Feather M0 Basic Proto** ,&nbsp;it has a bunch of prototyping space...

In Stock
[Buy Now](https://www.adafruit.com/product/2772)
[Related Guides to the Product](https://learn.adafruit.com/products/2772/guides)
### VCNL4010 Proximity/Light sensor

[VCNL4010 Proximity/Light sensor](https://www.adafruit.com/product/466)
The VCNL4010 sensor is a nice way to add a small-distance proximity sensor to your microcontroller project. For longer distances (in the range of cm, you can use a [SHARP IR distance sensor](https://www.adafruit.com/products/164), but those are only good if the object is over 10 cm...

In Stock
[Buy Now](https://www.adafruit.com/product/466)
[Related Guides to the Product](https://learn.adafruit.com/products/466/guides)
### RGB Color Sensor with IR filter and White LED - TCS34725

[RGB Color Sensor with IR filter and White LED - TCS34725](https://www.adafruit.com/product/1334)
Discontinued - **you can grab** [**Adafruit APDS9960 Proximity, Light, RGB, and Gesture Sensor - STEMMA QT / Qwiic**](https://www.adafruit.com/product/3595) **&nbsp;instead!**

Your electronics can now see in dazzling color with this lovely color light...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1334)
[Related Guides to the Product](https://learn.adafruit.com/products/1334/guides)
### 5V 10A switching power supply

[5V 10A switching power supply](https://www.adafruit.com/product/658)
This is a beefy switching supply, for when you need a lot of power! It can supply 5V DC up to 10 Amps, running from 110V or 220V power (the plug it comes with is for US/Canada/Japan but you can use any plug adapter for your country, or just replace the cable with a standard computer/appliance...

In Stock
[Buy Now](https://www.adafruit.com/product/658)
[Related Guides to the Product](https://learn.adafruit.com/products/658/guides)
### Female DC Power adapter - 2.1mm jack to screw terminal block

[Female DC Power adapter - 2.1mm jack to screw terminal block](https://www.adafruit.com/product/368)
If you need to connect a DC power wall wart to a board that doesn't have a DC jack - this adapter will come in very handy! There is a 2.1mm DC jack on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

In Stock
[Buy Now](https://www.adafruit.com/product/368)
[Related Guides to the Product](https://learn.adafruit.com/products/368/guides)
### Adafruit NeoPixel Digital RGB LED Strip - Black 30 LED 5m

[Adafruit NeoPixel Digital RGB LED Strip - Black 30 LED 5m](https://www.adafruit.com/product/1460)
You thought it couldn't get better than [our world-famous 32-LED-per-meter Digital LED strip](http://adafruit.com/products/306) but we will prove you wrong! These NeoPixel strips have 30 digitally-addressable pixel LEDs per meter and are very affordable and are only 12.5 mm...

In Stock
[Buy Now](https://www.adafruit.com/product/1460)
[Related Guides to the Product](https://learn.adafruit.com/products/1460/guides)

## Related Guides

- [Adafruit Feather 32u4 Basic Proto](https://learn.adafruit.com/adafruit-feather-32u4-basic-proto.md)
- [Starduino: 8-Bit Super Mario Tree Topper](https://learn.adafruit.com/starduino-neopixel-8-bit-mario-star-tree-topper.md)
- [MicroPython Basics: How to Load MicroPython on a Board](https://learn.adafruit.com/micropython-basics-how-to-load-micropython-on-a-board.md)
- [MIDI Solenoid Drummer](https://learn.adafruit.com/midi-solenoid-drummer.md)
- [Custom Bluetooth Cherry MX Gamepad](https://learn.adafruit.com/custom-wireless-bluetooth-cherry-mx-gamepad.md)
- [Adafruit IO Home: Security ](https://learn.adafruit.com/adafruit-io-home-security.md)
- [Magic Wand](https://learn.adafruit.com/magic-wand.md)
- [Multi-tasking the Arduino - Part 3](https://learn.adafruit.com/multi-tasking-the-arduino-part-3.md)
- [FLORA NeoGeo Watch](https://learn.adafruit.com/flora-geo-watch.md)
- [Flora+NeoPixel LED Skateboard Upgrade](https://learn.adafruit.com/flora-neopixel-led-skateboard-upgrade.md)
- [NeoPixel Jack-o-lantern](https://learn.adafruit.com/neopixel-jack-o-lantern.md)
- [LPC824 NeoPixel IR Distance Sensor](https://learn.adafruit.com/lpc824-neopixel-ir-distance-sensor.md)
- [Sound Reactive LED Top Hat](https://learn.adafruit.com/sound-reactive-led-top-hat.md)
- [CircuitPython BLE Crickit Rover](https://learn.adafruit.com/circuitpython-ble-crickit-rover.md)
- [My Mini Race Car](https://learn.adafruit.com/my-mini-race-car.md)
- [Sipping Power With NeoPixels](https://learn.adafruit.com/sipping-power-with-neopixels.md)
