My Template app for TinyBLE.
Dependencies: mbed BLE_API nRF51822 eMPL_MPU6050
main.cpp@0:6b6900bd4e1a, 2020-08-21 (annotated)
- Committer:
- arils
- Date:
- Fri Aug 21 23:43:15 2020 +0000
- Revision:
- 0:6b6900bd4e1a
- Child:
- 1:cea2f48b1aff
Latest;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
arils | 0:6b6900bd4e1a | 1 | #include "mbed.h" |
arils | 0:6b6900bd4e1a | 2 | |
arils | 0:6b6900bd4e1a | 3 | DigitalOut led_red(22); |
arils | 0:6b6900bd4e1a | 4 | DigitalOut led_green(21); |
arils | 0:6b6900bd4e1a | 5 | DigitalOut led_blue(23); |
arils | 0:6b6900bd4e1a | 6 | |
arils | 0:6b6900bd4e1a | 7 | int main() { |
arils | 0:6b6900bd4e1a | 8 | while(1) { |
arils | 0:6b6900bd4e1a | 9 | led_red = 1; |
arils | 0:6b6900bd4e1a | 10 | wait(1); |
arils | 0:6b6900bd4e1a | 11 | led_red = 0; |
arils | 0:6b6900bd4e1a | 12 | wait(1); |
arils | 0:6b6900bd4e1a | 13 | |
arils | 0:6b6900bd4e1a | 14 | led_green = 1; |
arils | 0:6b6900bd4e1a | 15 | wait(1); |
arils | 0:6b6900bd4e1a | 16 | led_green = 0; |
arils | 0:6b6900bd4e1a | 17 | wait(1); |
arils | 0:6b6900bd4e1a | 18 | |
arils | 0:6b6900bd4e1a | 19 | led_blue = 1; |
arils | 0:6b6900bd4e1a | 20 | wait(1); |
arils | 0:6b6900bd4e1a | 21 | led_red = 0; |
arils | 0:6b6900bd4e1a | 22 | wait(1); |
arils | 0:6b6900bd4e1a | 23 | } |
arils | 0:6b6900bd4e1a | 24 | } |