Firmata is a light weight protocol that was designed to make it possible to control an Uno from a variety of external devices, such as you laptop using another programming language. We've ported Firmata over to BLE using our Adafruit_BLE_UART as the transport layer, and created an easy to use IDE to help you get started with it.
BLE StandardFirmata
The first thing you'll need to do is download the Adafruit_BLE_PinIO repository from the Arduino library manager.
Open up the Arduino library manager:
Search for the Adafruit BLEFirmata library and install it
We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
The Adafruit_PinIO sketches also requires Adafruit_nRF8001 to be present in your libraries folder but you already installed that so you should be good to go if you went through the UART echo tests.
Once this library is installed, open up the StandardFirmata sketch (File > Examples > Adafruit_BLEFirmata > StandardFirmata), compile the sketch, and program the Uno with your firmware.
Wiring up for Firmata demo
The Firmata BLE app demo allows you to some basic functionality with your Arduino, great for testing out ideas or sensors- Digital Input (e.g. switches)
- Digital Output (e.g. relays)
- Analog Input (e.g. sensors)
- PWM Output (e.g. LED dimming)
- Connect a standard LED (any color) with a inline resistor (220-1K is fine) to Digital 7
- Connect an RGB LED (either common cathode or anode) so that the red, green and blue LED pins tie to Digital 3 5 and 6 with inline resistors. If using common anode, connect the fourth pin to 5V. If using common cathode, connect it to GND.
- Connect a switch of some sort to Digital 4 so that when pressed, it connects to ground. No pullup resistor is required
- Connect a potentiometer (any value 500 ohm to 1Mohm) so that the two outer legs connect to 5V and GND and the middle pin connects to Analog 5