10.11.2016.
Dependencies: mbed
main.cpp
- Committer:
- kgrdosic
- Date:
- 2016-11-10
- Revision:
- 0:6f27f45a3058
File content as of revision 0:6f27f45a3058:
#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; }