Exemplo (Nucleo_BLE_HeartRate) X-NUCLEO-IDB04A1
Dependencies: BLE_API X_NUCLEO_IDB0XA1 mbed
main.cpp@0:0bb81c079a85, 2016-09-02 (annotated)
- Committer:
- wlmattos
- Date:
- Fri Sep 02 21:51:39 2016 +0000
- Revision:
- 0:0bb81c079a85
Exemplo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wlmattos | 0:0bb81c079a85 | 1 | #include "mbed.h" |
wlmattos | 0:0bb81c079a85 | 2 | |
wlmattos | 0:0bb81c079a85 | 3 | SPI device(SPI_MOSI, SPI_MISO, SPI_SCK); |
wlmattos | 0:0bb81c079a85 | 4 | |
wlmattos | 0:0bb81c079a85 | 5 | int main() { |
wlmattos | 0:0bb81c079a85 | 6 | int i = 0; |
wlmattos | 0:0bb81c079a85 | 7 | while(1) { |
wlmattos | 0:0bb81c079a85 | 8 | device.write(0x55); |
wlmattos | 0:0bb81c079a85 | 9 | device.write(i++); |
wlmattos | 0:0bb81c079a85 | 10 | device.write(0xE0); |
wlmattos | 0:0bb81c079a85 | 11 | wait_us(50); |
wlmattos | 0:0bb81c079a85 | 12 | } |
wlmattos | 0:0bb81c079a85 | 13 | } |
wlmattos | 0:0bb81c079a85 | 14 |