Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- zeneto
- Date:
- 2018-07-03
- Revision:
- 1:e7d2231abccc
- Parent:
- 0:00e9a2a6f73a
- Child:
- 2:82e0ae145867
File content as of revision 1:e7d2231abccc:
#include "mbed.h"
InterruptIn btn(D7);
DigitalOut led(LED_BLUE);
void button_pressed() {
led = !led; // toggle the LED
}
int main(int, char**) {
btn.fall(&button_pressed); // whenever the button falls, execute button_pressed function
while (1) {}
}