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.
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).
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.
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
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.
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
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
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
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.
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
Nothing yet.
Comments, questions, or concerns? Drop us a line!.