RFDuino Color Wheel

Overview

This is a basic tutorial that will get your RFDuino talking with your iOS device. We will be controlling an RGB LED through the iOS device -- changing it’s color and brightness.

List of Materials

NameQty.
RFduino PCB USB Shield (FTDI Breakout)1
NameQty.
RFduino Development Board (Breadboard-able)1
NameQty.
Jumper wires4
NameQty.
330Ω resistors3
NameQty.
Diffused RGB LED (common anode)1
NameQty.
Breadboard1

Prior Knowledge

This tutorial assumes you have already setup and configured the Arduino software (make sure you have at least version 1.5.7 in order for it to be compatible with the RFDuino).


Setting Up the Software

You will need to get the RFDuino library installed on your machine in order to program it through the Arduino software.  Go here http://www.rfduino.com/download-rfduino-library/ and download the ZIP file. Then, you need to unzip the file and place the RFDuino folder.

 

OSX

1) Go to Applications, then right click (Ctrl + click) on Arduino and select “Show Contents Folder”

2) Navigate to Contents -> Java -> hardware -> arduino and place the RFDuino folder here

 

Windows

Go to Windows Explorer and navigate to the folder where you installed Arduino

Navigate to hardware -> arduino and place the RFDuino folder here

Note: Make sure you are using the latest version of the Arduino software (at the time of this writing 1.5.7 Beta). If you use the 1.0.5 version you will have issues when uploading to the RFDuino.

You should be able to verify you have added this folder in the correct place by opening the Arduino application. Then, going to Tools -> Board in the top menu and seeing RFDuino as an option.


Installing the RFDuino USB Driver

The RFDuino requires a USB driver to be downloaded and installed. You can find step by step instructions for this starting on Page 4 at http://www.rfduino.com/wp-content/uploads/2014/04/RFduino.Quick_.Start_.Guide_.pdf

 


Setting Up the Hardware

The configuration is pretty straight forward. Use the schematic below to connect the components. Keep in mind no ground is used because the LED being used is a common anode LED.


Programming the RFDuino

Import the RFDuino Libraries

Open the Arduino application

Go to Sketch -> Import Library -> Add Library, navigate to the RFDuino folder you added earlier

Select the RFDuino folder and click Open

Load the ColorWheel sketch

Go to File -> Examples -> RFDuino -> libraries -> RFDuino BLE -> Colorwheel

Select Colorwheel

Load this sketch onto the RFDuino, making sure the RFDuino board is selected under Tools -> Board

Note: Also make sure the correct Port is selected under Tools -> Port

It’s important to note that because we are working with a common anode LED the values for the LED are inverted. For example, LOW will turn the circuit on and HIGH will turn the circuit off. To help understand this further, visit this link: http://forum.arduino.cc/index.php/topic,22413.0.html


Downloading the App (iOS)

The app we will be using for this tutorial is called RFDuino ColorWheel. The link below will take you straight to it or you can search “rfduino colorwheel” in the App Store and it should be the only one that pulls up. Download and install!

https://itunes.apple.com/us/app/rfduino-colorwheel/id685753295


Running the Demo

Once the sketch has been loaded onto the RFDuino and the app has been installed on your mobile device. The demo is ready to be tested. The LED should light up with all 3 colors fully until the app is open and the RFDuino device is selected. Once it has been selected the LED will shut off and you can begin changing it’s colors.


Android App Alternative

Unfortunately, a color wheel app has not been created for Android at this time. We will be working to bring you an alternative for Android soon. In the meantime, you can try using the app from the link below and playing with the Colorwheel sketch.

http://forum.rfduino.com/index.php?topic=44.0


Additional Resources

Nothing yet.


Comments, questions, or concerns? Drop us a line!.