ble button A on microbit

Dependencies:   BLE_API mbed nRF51822 X_NUCLEO_IDB0XA1

Fork of BLE_HeartRate by Bluetooth Low Energy

Files at this revision

API Documentation at this revision

Comitter:
yramesh
Date:
Fri Jan 26 16:23:35 2018 +0000
Parent:
80:62f38a170d5e
Commit message:
bb works

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Jan 23 18:45:00 2018 +0000
+++ b/main.cpp	Fri Jan 26 16:23:35 2018 +0000
@@ -13,7 +13,26 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
+//#defines for each edge connector pin
+#define MICROBIT_PIN_P0                     P0_3        //P0 is the left most pad (ANALOG/DIGITAL) used to be P0_3 on green board
+#define MICROBIT_PIN_P1                     P0_2        //P1 is the middle pad (ANALOG/DIGITAL)
+#define MICROBIT_PIN_P2                     P0_1        //P2 is the right most pad (ANALOG/DIGITAL) used to be P0_1 on green board
+#define MICROBIT_PIN_P3                     P0_4        //COL1 (ANALOG/DIGITAL)
+#define MICROBIT_PIN_P4                     P0_5        //COL2 (ANALOG/DIGITAL)
+#define MICROBIT_PIN_P5                     P0_17       //BTN_A
+#define MICROBIT_PIN_P6                     P0_12       //COL9
+#define MICROBIT_PIN_P7                     P0_11       //COL8
+#define MICROBIT_PIN_P8                     P0_18       //PIN 18
+#define MICROBIT_PIN_P9                     P0_10       //COL7
+#define MICROBIT_PIN_P10                    P0_6        //COL3 (ANALOG/DIGITAL)
+#define MICROBIT_PIN_P11                    P0_26       //BTN_B
+#define MICROBIT_PIN_P12                    P0_20       //PIN 20
+#define MICROBIT_PIN_P13                    P0_23       //SCK
+#define MICROBIT_PIN_P14                    P0_22       //MISO
+#define MICROBIT_PIN_P15                    P0_21       //MOSI
+#define MICROBIT_PIN_P16                    P0_16       //PIN 16
+#define MICROBIT_PIN_P19                    P0_0        //SCL
+#define MICROBIT_PIN_P20 P0_30 //SDA
 #include "mbed.h"
 #include "ble/BLE.h"
 #include "ButtonService.h"
@@ -26,7 +45,7 @@
 
 DigitalOut heartbeat(P0_13);
 
-DigitalIn touch(P0_0);
+DigitalIn touch(P0_3);
 bool touchState = false;
 
 
--- a/mbed.bld	Tue Jan 23 18:45:00 2018 +0000
+++ b/mbed.bld	Fri Jan 26 16:23:35 2018 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85
+http://mbed.org/users/mbed_official/code/mbed/builds/7130f322cb7e
\ No newline at end of file