In this sample, we will connect an RGB LED strip to an Arduino and draw colors using a Windows 10 phone over Bluetooth using Windows Virtual Shields for Arduino.
You will need the following components :
an Arduino UNO or compatible
a SparkFun Bluetooth Modem - BlueSMiRF Silver](https://www.sparkfun.com/products/12577)
solder and a soldering iron
20 red/black/green/yellow wires at 6 inches length each (5 sets of 4 colors).
a picture frame
a 8x11” paper drawing from an artistic family member, friend or yourself
Follow the instructions at this Arduino repository to set up your Arduino.
Follow the instructions at this Universal repository to set up your Windows Phone.
The RGB LED strips come with 48 LEDs in a strip.
- Carefully split apart the RGB strips at the seams so that you have 6 strips of 8 lights.
- Keeping the power connector (and other original wires) at the bottom right of the 6 strips,
- … solder wires between the splits so that the ends are reconnected through the wires.
In the Arduino IDE (set up from Connect to your Device : Arduino), choose the menu item File->Examples->VirtualShield->RGB-LED Draw.
Upload to your Arduino.
- The phone will show a grid of gray blocks. Each block represents a pixel on the picture backing. On the right is a set of colors to choose from.
- Touch a color (i.e. Blue). The "Set All" button should turn to your color indicating it is ready to draw.
- Slowly start drawing on the grid. The blocks will change to that color on the phone, and the RGB pixels will update on the frame.
- The "Set All" button clears the grid to the chosen color.
- The Windows 10 phone only has an app which responds to requests from the Arduino sketch. The app is currently sideloaded, however will be provided as a free app in the app store when available.
- The Arduino sketch creates a grid of rectangles using the screen.fillRectangle() method (of Virtual Shields.Graphics). When those rectangles get the pointer entered/exit or tapped events, they change to the selected color while also updating the RGB LED strip.