Applied engineering Team / Mbed 2 deprecated VT1_Herek

Dependencies:   mbed

Committer:
Goran002
Date:
Thu Nov 10 19:04:33 2016 +0000
Revision:
2:928931868ac8
Parent:
1:bf24c62c6310
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 2:928931868ac8 5 int main()
Goran002 2:928931868ac8 6 {
Goran002 2:928931868ac8 7 button.rise(&toggle); // attach the address of the toggle
Goran002 1:bf24c62c6310 8 } // function to the rising edge
Goran002 2:928931868ac8 9 void toggle()
Goran002 2:928931868ac8 10 {
Goran002 2:928931868ac8 11 led1=!led1;
Goran002 0:d2afa897dbc9 12 }