My Template app for TinyBLE.
Dependencies: mbed BLE_API nRF51822 eMPL_MPU6050
main.cpp
- Committer:
- arils
- Date:
- 2020-08-22
- Revision:
- 2:45d3ae0a3b3c
- Parent:
- 1:cea2f48b1aff
File content as of revision 2:45d3ae0a3b3c:
#include "mbed.h" #include "tiny_ble.h" //AnalogOut led_red(p22); //AnalogOut led_green(p21); AnalogOut led_blue(LED_BLUE); int main() { /*led_red = 1; led_green = 1; led_blue = 1; while(1) { for (i = 0; i < 1; i+=0.01) { led_red.write_u16((uint16_t)i); wait(0.01)z } //led_red = 0; //wait(1); //led_red = 1; /wait(1); //led_green = 0; //wait(1); //led_green = 1; //wait(1); //led_blue = 0; //wait(1); //led_blue = 1; //wait(1); }*/ while (1) for (float i = 0.0; i<1.0; i+=0.1) { led_blue = i; wait(0.1); } } }