Applied engineering Team / Mbed 2 deprecated VT1_Herek

Dependencies:   mbed

Committer:
Goran002
Date:
Thu Nov 10 19:02:42 2016 +0000
Revision:
1:bf24c62c6310
Parent:
0:d2afa897dbc9
Child:
2:928931868ac8
VT2_Goran Herek

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Goran002 0:d2afa897dbc9 1 #include "mbed.h"
Goran002 1:bf24c62c6310 2 InterruptIn button(p18); // Interrupt on digital pushbutton input p18
Goran002 1:bf24c62c6310 3 DigitalOut led1(p5); // digital out to p5
Goran002 1:bf24c62c6310 4 void toggle(void); // function prototype
Goran002 0:d2afa897dbc9 5 int main() {
Goran002 1:bf24c62c6310 6 button.rise(&toggle); // attach the address of the toggle
Goran002 1:bf24c62c6310 7 } // function to the rising edge
Goran002 1:bf24c62c6310 8 void toggle() {
Goran002 1:bf24c62c6310 9 led1=!led1;
Goran002 0:d2afa897dbc9 10 }