A nice BLE demo program which allows remote switch of an LED via GATT interface.

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_Button by Bluetooth Low Energy

Committer:
hux
Date:
Sat Oct 21 19:56:15 2017 +0000
Revision:
13:0563f1aa6a75
Parent:
12:0d0ca44397dd
Switch LED via BLE GATT

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hux 11:80f2c19ecbce 1 // bricks/target.h - define target specifics
hux 11:80f2c19ecbce 2
hux 11:80f2c19ecbce 3 #ifndef _BRICKS_TARGET_H_
hux 11:80f2c19ecbce 4 #define _BRICKS_TARGET_H_
hux 11:80f2c19ecbce 5
hux 12:0d0ca44397dd 6 #define MTCONNECT04 // MtM nRF51822 module MtConnect04
hux 12:0d0ca44397dd 7
hux 11:80f2c19ecbce 8 // platform specific defines - comment out platforms which are not used
hux 11:80f2c19ecbce 9 // We work only with two kinds of platform:
hux 11:80f2c19ecbce 10 //
hux 11:80f2c19ecbce 11 // a) a NUCLEO platform from STMicroelectronics
hux 11:80f2c19ecbce 12 // b) a nRF51 platform from Nordic Semiconductor
hux 11:80f2c19ecbce 13 //
hux 11:80f2c19ecbce 14 // If we have not a nRF51 target then we coclude it is a NUCLEO target. This is
hux 11:80f2c19ecbce 15 // not really clean, but under above assumptions it works so far!
hux 11:80f2c19ecbce 16
hux 11:80f2c19ecbce 17 #ifdef TARGET_NRF51822
hux 11:80f2c19ecbce 18 # define LED_INVERTED // inverted LED for nRF51 targets
hux 11:80f2c19ecbce 19 #endif
hux 11:80f2c19ecbce 20
hux 12:0d0ca44397dd 21 #ifdef MTCONNECT04
hux 12:0d0ca44397dd 22 # define BLINK_LED p16
hux 12:0d0ca44397dd 23 #endif
hux 12:0d0ca44397dd 24
hux 11:80f2c19ecbce 25 #endif // _BRICKS_TARGET_H_