Skip to content

Commit

Permalink
Merge pull request #165 from punamdahiya/Issue_162-ReadMe
Browse files Browse the repository at this point in the history
Add ReadMe for BLE-Buzzy-Pixel Arduino sketch
  • Loading branch information
punamdahiya authored Aug 29, 2016
2 parents ea9af3b + 5684cbe commit 0bd4e6d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions Bluetooth/nRF51822/Arduino/BLE-Buzzy-Pixel/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Bluetooth Low Energy (BLE) Buzzy Pixel

BLE Buzzy Pixel Arduino sketch to read and set status and animations on NeoPixel strip

## Steps to run BLE-Buzzy-Pixel

* Install 1.0.5 RedBearLabs nRF51822 board using board manager: https://github.com/RedBearLab/nRF51822-Arduino#install-board-package-add-on.

* Go to Sketch -> Include Library -> Manage Libraries. Search for BLE Peripheral and install version 0.2.0

* Search for Adafruit NeoPixel library and install version 1.0.5. Installed library needs nRF51 board support to compile.
See https://github.com/adafruit/Adafruit_NeoPixel/pull/42

* Overwrite Adafruit_NeoPixel.cpp inside installed libraries at /Documents/Arduino/libraries/Adafruit_NeoPixel/ with [nRF51 Adafruit_Neopixel.cpp](https://github.com/mozilla/project_haiku.iot/tree/master/Bluetooth/nRF51822/Libraries/Adafruit_NeoPixel_nRF51/) file from here.

* Open BLE-Buzzy-Pixel.ino file. Update config.h with pin out and pixel count settings as per your circuit and upload the code to BLE Nano.

* If there are erros while uploading sketch using Arduino IDE, follow [instrcutions here](https://github.com/mozilla/project_haiku.iot/tree/master/Bluetooth/nRF51822/Arduino#arduino-upload-instructions-if-nothing-else-work) to copy latest bootloader.hex to BLE Nano board.

* To test uploadeded sketch BLE-Buzzy-Pixel, use LightBlue iOS app or nRFCOnnect Android app to find BLE Nano peripheral device 'BLE-Buzzy-Pixel' and select to connect. It should show READ-WRITE and READ-NOTIFY services. Select READ-WRITE service and click on Write new value and enter ‘00’ for turning NeoPixel off. Enter ‘01’ to turn NeoPixel on. You can see the output in serial monitor at baud rate 9600.
Click on READ-NOTIFY service and start listening to notifications. Button press should send 0x01 and turn NeoPixel on. Release of button should send 0x00 and turn NeoPixel off.

* To test uploaded sketch with BLE-Buzzy-Pixel Cordova app, install app on Android phone following [instructions here](https://github.com/mozilla/project_haiku.iot/tree/master/Bluetooth/nRF51822/PhoneGap/BLE-Buzzy-Pixel)

[Link to Video](http://youtu.be/B1qS--DboT4) showing BLE-Buzzy-Pixel Cordova app communicating with BLE Nano

### Bill Of Material - BLE-Buzzy-Pixel

* BLE Nano & MK20 USB Board - http://redbearlab.com/blenano/
* [Optional] RedBearLab nRF51822 Pinout - http://redbearlab.com/redbearlab-nrf51822/ (Ideally BLE Nano should suffice, for beginners nRF51822 dev board is recommended instead of BLENano at first as it has easy pin out interface)
* "Neopixel" WS2812 addressable LED strip. Non-waterproof, 60 LEDs per meter. (cut strip of 5 LEDs per unit) [Amazon](https://www.amazon.com/Mokungit-Programmable-Individually-Addressable-Non-waterproof/dp/B01D1EDDR8?ie=UTF8&*Version*=1&*entries*=0)
* Sparkfun inventor kits part for resistor, buttons, led and jumper wires - [Sparkfun](https://www.sparkfun.com/products/13110)
* Breadboard - [Sparkfun](https://www.sparkfun.com/products/12002)

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Bluetooth Low Energy (BLE) technology

Arduino sketches to flash on RedBear Labs nRF51822 or BLE Nano board. Install Lightblue iOS app or the Android App - B-BLE to scan and debug BLE peripheral devices
Arduino sketches to flash on RedBear Labs nRF51822 or BLE Nano board. Install Lightblue iOS app or the Android App - nRFConnect to scan and debug BLE peripheral devices


## Steps to run BLE_UART_LED
Expand Down
1 change: 1 addition & 0 deletions Bluetooth/nRF51822/PhoneGap/BLE-Buzzy-Pixel/ReadME.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Follow below commands to create cordova Android app. [Link with command details]
* To check if you satisfy requirements for building the platform use command - cordova requirements
* cordova plugin add cordova-plugin-bluetoothle@3.1.0 - [Tested with 3.1.0]
* cordova plugin add path to local cordova-plugin-fetch directory [../Plugins/cordove-plugin-fetch]
* Update [config settings here](https://github.com/mozilla/project_haiku.iot/blob/master/Bluetooth/nRF51822/PhoneGap/BLE-Buzzy-Pixel/www/js/config.js). Status Service is link to cloud service to read and update status and messages.
* cordova build
* connect android device to your machine, then to run app use command- cordova run android

Expand Down

0 comments on commit 0bd4e6d

Please sign in to comment.