Jackson Lv / Mbed 2 deprecated BLENano_RGB_Demo_DAP

Dependencies:   BLE_API ChainableLED mbed nRF51822

Fork of BLENano_RGB_Demo by Jackson Lv

Files at this revision

API Documentation at this revision

Comitter:
Jackson_lv
Date:
Wed Apr 27 09:52:09 2016 +0000
Parent:
1:e7dc9b3590dd
Commit message:
BLE Nano RGB demo with DAP board

Changed in this revision

ChainableLED.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
nRF51822.lib Show annotated file Show diff for this revision Revisions of this file
--- a/ChainableLED.lib	Wed Apr 20 03:44:22 2016 +0000
+++ b/ChainableLED.lib	Wed Apr 27 09:52:09 2016 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/Jackson_lv/code/ChainableLED/#22cae1dee34b
+ChainableLED#e7513df9d7cb
--- a/main.cpp	Wed Apr 20 03:44:22 2016 +0000
+++ b/main.cpp	Wed Apr 27 09:52:09 2016 +0000
@@ -31,7 +31,9 @@
 #define TXRX_BUF_LEN                     5
 
 #define LOCAL_NAME                       "RGB-L"
-#define BUTTON_PIN                       P0_8//D3
+#define BUTTON_PIN                       P0_11//D0
+#define RGB_CLK_PIN                      P0_10//D2
+#define RGB_DIO_PIN                      P0_8//D3
 #define DEVICE_ID                        0xFF
 #define LIGHT_PIN                        P0_5//A3
 #define VOL_PIN                          P0_4//A4
@@ -44,7 +46,7 @@
 
 BLEDevice       ble;
 
-ChainableLED    leds(P0_11, P0_9, P0_10,1);
+ChainableLED    leds(RGB_CLK_PIN, RGB_DIO_PIN, 1);
 
 AnalogIn       light_sen(LIGHT_PIN);
 AnalogIn       vin(VOL_PIN);
@@ -213,8 +215,8 @@
     rgb_status = 0;
     leds.setColorRGB(0, 0, 0, 0);  
         
-    button.mode(PullUp);
-    button.fall(&button_handle);
+    button.mode(PullDown);
+    button.rise(&button_handle);
     Ticker ticker;
     ticker.attach_us(m_status_check_handle, 200000);
        
--- a/nRF51822.lib	Wed Apr 20 03:44:22 2016 +0000
+++ b/nRF51822.lib	Wed Apr 27 09:52:09 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#1751e2e2637a
+http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#f7faad332abc