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.
Fork of Bootcamp-InterruptJoystick by
main.cpp
- Committer:
- avnisha
- Date:
- 2013-10-07
- Revision:
- 2:d18857b99d3c
- Parent:
- 1:102ef7d39407
- Child:
- 3:27ec45bc9078
File content as of revision 2:d18857b99d3c:
#include "mbed.h" // // ignore interrupt version till we discuss that topic // #ifdef INTERRUPT InterruptIn fire(p14); DigitalOut led(LED1); DigitalOut flash(LED4); void ISR1() { led = !led; } int main() { fire.rise(&ISR1); fire.fall(&ISR1); while (1) { flash = !flash; wait(0.25); } } #endif #include "mbed.h" BusIn joy(p15,p12,p13,p16); InterruptIn fire(p14); BusOut leds(LED1,LED2,LED3,LED4); int main() { while(1) { if (fire) { leds=0xf; } else { leds=joy; } wait(0.1); } }