# MagicLight Bulb Color Mixer with Circuit Playground Bluefruit

## Overview

https://www.youtube.com/watch?v=qEhtbHLAYho

RGB Bluetooth LE light bulbs (a.k.a. "smart bulbs") for household light sockets are really neat-o, allowing you to create custom lighting effects for your room. Typically, these are controlled with a mobile device app, but we think it's much more fun to build our own custom remote, and use physical sliders to mix colors!

Using **CircuitPython** ,&nbsp;running on the nRF52840-based **Circuit Playground Bluefruit (CPB)**, makes it all possible. We can send the same commands over Bluetooth LE (BLE) from the CPB as you would normally from your mobile device, the proprietary MagicLight app, and a whole lot more!

We'll harness the Circuit Playground Bluefruit board's buttons, slide switch, on-board NeoPixels, and speaker to act as RGB color value indicators, connection state UI, two-position dimmer switch, and momentary light blinkers!

## Parts
**[MagicLight Bluetooth LE Bulb](https://www.magiclightbulbs.com/collections/bluetooth-bulbs/products/bluetooth-smart-bulb-40w)**

You can find these at many online retailers and big box hardware stores.

![leds_Main_Image_Item_569611168_BT_Mini_1024x1024.jpg](https://cdn-learn.adafruit.com/assets/assets/000/086/669/medium640/leds_Main_Image_Item_569611168_BT_Mini_1024x1024.jpg?1578343487)

### Circuit Playground Bluefruit - Bluetooth® Low Energy

[Circuit Playground Bluefruit - Bluetooth® Low Energy](https://www.adafruit.com/product/4333)
 **Circuit Playground Bluefruit** is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've taken the popular Circuit Playground Express and made it even better! Now the main chip is an nRF52840...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4333)
[Related Guides to the Product](https://learn.adafruit.com/products/4333/guides)
![shot of a Black woman's neon-green manicured hand holding up a Circuit Playground Bluefruit glowing rainbow LEDs.](https://cdn-shop.adafruit.com/640x480/4333-11.jpg)

### Slide Potentiometer with Plastic Knob - 35mm Long - 10KΩ

[Slide Potentiometer with Plastic Knob - 35mm Long - 10KΩ](https://www.adafruit.com/product/4271)
_Slip slidin' away&nbsp;  
Slip slidin' away&nbsp;  
You know the nearer your resistance&nbsp;  
The more you're slip slidin' away_

If you're tired of the regular-old-twisty potentiometers we carry, why not _slide_ over and try this slide pot?...

In Stock
[Buy Now](https://www.adafruit.com/product/4271)
[Related Guides to the Product](https://learn.adafruit.com/products/4271/guides)
![hand slowly sliding potentiometer back and forth - 35mm Long.](https://cdn-shop.adafruit.com/product-videos/640x480/4271-04.jpg)

### Half Sized Premium Breadboard - 400 Tie Points

[Half Sized Premium Breadboard - 400 Tie Points](https://www.adafruit.com/product/64)
This is a cute, half-size breadboard with&nbsp;400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm&nbsp;x 5.5cm&nbsp;with a standard double-strip in the middle and two power rails on both sides.&nbsp;You can pull the power rails off easily to make the breadboard as...

Out of Stock
[Buy Now](https://www.adafruit.com/product/64)
[Related Guides to the Product](https://learn.adafruit.com/products/64/guides)
![Angled shot of half-size solderless breadboard with red and black power lines.](https://cdn-shop.adafruit.com/640x480/64-06.jpg)

### Breadboarding wire bundle

[Breadboarding wire bundle](https://www.adafruit.com/product/153)
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent wires" that are sometimes sold with breadboards, and faster than stripping your own solid core wires. Makes...

In Stock
[Buy Now](https://www.adafruit.com/product/153)
[Related Guides to the Product](https://learn.adafruit.com/products/153/guides)
![Bundle of multi-colored multi-length wire jumpers](https://cdn-shop.adafruit.com/640x480/153-04.jpg)

### Fully Reversible Pink/Purple USB A to micro B Cable - 1m long

[Fully Reversible Pink/Purple USB A to micro B Cable - 1m long](https://www.adafruit.com/product/4111)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also fully reversible! That's right, you will save _seconds_ a day by not having to flip the cable around.

First let's talk about the cover and over-molding. We got these...

In Stock
[Buy Now](https://www.adafruit.com/product/4111)
[Related Guides to the Product](https://learn.adafruit.com/products/4111/guides)
![Fully Reversible Pink/Purple USB A to micro B Cable](https://cdn-shop.adafruit.com/640x480/4111-02.jpg)

Let's get on with the magic!

![](https://cdn-learn.adafruit.com/assets/assets/000/086/840/medium800thumb/leds_ms-1qCmtr.jpg?1578682495)

- [Next Page](https://learn.adafruit.com/magiclight-bulb-mixer/understanding-ble-characteristics.md)

## Featured Products

### Circuit Playground Bluefruit - Bluetooth® Low Energy

[Circuit Playground Bluefruit - Bluetooth® Low Energy](https://www.adafruit.com/product/4333)
 **Circuit Playground Bluefruit** is our third board in the Circuit Playground series, another step towards a perfect introduction to electronics and programming. We've taken the popular Circuit Playground Express and made it even better! Now the main chip is an nRF52840...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4333)
[Related Guides to the Product](https://learn.adafruit.com/products/4333/guides)
### Slide Potentiometer with Plastic Knob - 35mm Long - 10KΩ

[Slide Potentiometer with Plastic Knob - 35mm Long - 10KΩ](https://www.adafruit.com/product/4271)
_Slip slidin' away&nbsp;  
Slip slidin' away&nbsp;  
You know the nearer your resistance&nbsp;  
The more you're slip slidin' away_

If you're tired of the regular-old-twisty potentiometers we carry, why not _slide_ over and try this slide pot?...

In Stock
[Buy Now](https://www.adafruit.com/product/4271)
[Related Guides to the Product](https://learn.adafruit.com/products/4271/guides)
### Fully Reversible Pink/Purple USB A to micro B Cable - 1m long

[Fully Reversible Pink/Purple USB A to micro B Cable - 1m long](https://www.adafruit.com/product/4111)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also fully reversible! That's right, you will save _seconds_ a day by not having to flip the cable around.

First let's talk about the cover and over-molding. We got these...

In Stock
[Buy Now](https://www.adafruit.com/product/4111)
[Related Guides to the Product](https://learn.adafruit.com/products/4111/guides)
### Half Sized Premium Breadboard - 400 Tie Points

[Half Sized Premium Breadboard - 400 Tie Points](https://www.adafruit.com/product/64)
This is a cute, half-size breadboard with&nbsp;400 tie points, good for small projects. It's 3.25" x 2.2" / 8.3cm&nbsp;x 5.5cm&nbsp;with a standard double-strip in the middle and two power rails on both sides.&nbsp;You can pull the power rails off easily to make the breadboard as...

Out of Stock
[Buy Now](https://www.adafruit.com/product/64)
[Related Guides to the Product](https://learn.adafruit.com/products/64/guides)
### Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces

[Small Alligator Clip to Male Jumper Wire Bundle - 12 Pieces](https://www.adafruit.com/product/3255)
For bread-boarding with unusual non-header-friendly surfaces, these cables will be your best friends! No longer will you have long strands of alligator clips that are grabbing little wires. These compact jumper cables have a premium male header on one end, and a grippy mini alligator clip on...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3255)
[Related Guides to the Product](https://learn.adafruit.com/products/3255/guides)
### Breadboarding wire bundle

[Breadboarding wire bundle](https://www.adafruit.com/product/153)
75 flexible stranded core wires with stiff ends molded on in red, orange, yellow, green, blue, brown, black and white. These are a major improvement over the "box of bent wires" that are sometimes sold with breadboards, and faster than stripping your own solid core wires. Makes...

In Stock
[Buy Now](https://www.adafruit.com/product/153)
[Related Guides to the Product](https://learn.adafruit.com/products/153/guides)
### Adafruit Circuit Playground Bluefruit Express Starter Kit

[Adafruit Circuit Playground Bluefruit Express Starter Kit](https://www.adafruit.com/product/4504)
If you missed out on ADABOX 014, its not too late for you to pick up the parts necessary to build many of the projects! This kit pack doesn't come with tissue paper or the nifty extras, but it does have all the electronic goodies you need  
  
This project pack features...

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

## Related Guides

- [Adafruit Circuit Playground Bluefruit](https://learn.adafruit.com/adafruit-circuit-playground-bluefruit.md)
- [Now Playing: Bluetooth Apple Media Service Display](https://learn.adafruit.com/now-playing-bluetooth-apple-media-service-display.md)
- [Wirelessly Program a Circuit Playground Bluefruit Using the File Glider App ](https://learn.adafruit.com/how-to-transfer-files-to-a-circuit-playground-bluefruit-using-the-fileglider-app.md)
- [Adafruit Circuit Playground TFT Gizmo](https://learn.adafruit.com/adafruit-tft-gizmo.md)
- [Snow Globe with Circuit Playground Bluefruit](https://learn.adafruit.com/snow-globe-bluefruit-cpb.md)
- [Frozen-Inspired Animated Pendant with Temperature Sensing](https://learn.adafruit.com/frozen-gizmo-pendant-with-temperature-sensing.md)
- [CLUE Metal Detector in CircuitPython](https://learn.adafruit.com/clue-metal-detector-circuitpython.md)
- [Circuit Playground Gizmo Ornaments](https://learn.adafruit.com/display-ornaments-with-circuit-playground.md)
- [PyLeap MP3 Playback for Circuit Playground Bluefruit](https://learn.adafruit.com/pyleap-mp3-playback-for-cpb.md)
- [Circuit Playground Bluefruit BLE Heart Rate Pendant with CircuitPython](https://learn.adafruit.com/ble-heart-rate-display-pendant.md)
- [DIY Quiz Show Controller System](https://learn.adafruit.com/quiz-show-controller-keyboard-bluetooth.md)
- [How to use the Puppet Module in the Bluefruit Playground App](https://learn.adafruit.com/how-to-use-the-puppet-module-in-the-bluefruit-playground-app.md)
- [Circuit Playground Bluefruit Pumpkin with Lights and Sounds ](https://learn.adafruit.com/pumpkin-with-circuit-playground-bluefruit.md)
- [Color Remote with Circuit Playground Bluefruit](https://learn.adafruit.com/color-remote-with-circuit-playground-bluefruit.md)
- [LED Reactive Light-Up Hockey Puck in MakeCode](https://learn.adafruit.com/led-hockey-puck.md)
