Full application
Dependencies: mbed libTCS34725 lib_LoRaWAN
main.cpp
- Committer:
- dsubotic
- Date:
- 2019-01-16
- Revision:
- 1:c3a839871165
- Parent:
- 0:1cadcdcf4521
- Child:
- 2:7040e447d0df
File content as of revision 1:c3a839871165:
#include "mbed.h" InterruptIn button(PG_0); DigitalOut led(PD_14); double delay = 0.5; // 500 ms void pressed() { delay = 0.1; // 100 ms } void released() { delay = 0.5; // 500 ms } int main() { // Assign functions to button button.fall(&pressed); button.rise(&released); while (1) { led = !led; wait(delay); } }