To use the Daftpunk BLE sketch you'll want to make sure you're using the latest version of the Arduino IDE (1.6.5 at the time of this writing).
If you're totally new to Arduino take a little time to go through some introductory tutorials like how to make a LED blink. This will help you understand how to use the IDE, load a sketch, and upload code.
Next you'll need to make sure the libraries used by the sketch are installed. With the latest Arduino IDE you can use its library manager to easily install libraries, or check out this guide on how to manually install a library. You'll want to install the following libraries:
- Adafruit BluefruitLE nRF51
- Adafruit NeoPixel
Search for the libraries in the library manager and they should be easy to find and install.
Next, you'll need to install the Adafruit AVR boards package from the Boards Manager. Open the Boards Manager and search for Adafruit AVR. This includes all of the boards from Adafruit and will make Arduino compatabile with them. The Daftpunk BLE sketch was tested with version 1.4.0.
This sketch will run the Bluetooth controlled LED program to the NeoPixel strips that are mounted to the front of the visor.
To load the sketch make sure the libraries above are installed, and the Arduino is connected to the computer through a USB cable. Under the Tools -> Board menu make sure the Adafruit Feather 32u4 is selected, and under the Tools -> Port menu the serial port for the Adafruit Feather is selected.
Then press the upload button or click the Sketch -> Upload item to send the code to the Arduino. Woo-hoo the sketch should be running.
Download the Adafruit BLE Connect app for iOS or Android. Under the peripherals list, tap the connect button on the Adafruit Bluefruit LE item. Make sure the Feather board is powered on. Select "Controller" and choose either Control Pad or the Color Picker.
Buttons 1-4 will trigger an animation.
- color wipe
- rainbow gradient
- rainbow cycle
Here you can change the brightness or RGB value of the leds.
Once the code is uploaded to the micro-controllers, its a good idea to protoptype the circuit using the diagram in the previous page. Test the NeoPixel Strip to ensure the components are functional. Try out the Adafruit Feather 32u4 Bluefruit LE and run the Adafruit Bluefruit LE Connect iOS/Android app. Play with the controls and use the color picker to change the colors of the NeoPixels.