Applied engineering Team / Mbed 2 deprecated VT1_Herek

Dependencies:   mbed

main.cpp

Committer:
Goran002
Date:
2016-11-10
Revision:
1:bf24c62c6310
Parent:
0:d2afa897dbc9
Child:
2:928931868ac8

File content as of revision 1:bf24c62c6310:

#include "mbed.h"
InterruptIn button(p18); // Interrupt on digital pushbutton input p18
DigitalOut led1(p5); // digital out to p5
void toggle(void); // function prototype
int main() {
button.rise(&toggle); // attach the address of the toggle
} // function to the rising edge
void toggle() {
led1=!led1;
}