Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API ChainableLED mbed nRF51822
Fork of BLENano_RGB_Demo by
Revision 2:12ee9ad6d00c, committed 2016-04-27
- 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
--- 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
