Lab1 Part2

Dependencies:   mbed

main.cpp

Committer:
jaredwil
Date:
2015-02-08
Revision:
1:6f2984a38b99
Parent:
0:272af4948198

File content as of revision 1:6f2984a38b99:

#include "mbed.h"

//Initialize Digital Out and Interrupt
InterruptIn pound(p25);
DigitalOut myled(LED1);

//Define Interrupt Functions
void pON () {
        myled = 1;
    }
void pOFF() {
        myled = 0;
    {
        
int main() {
    myled = 0;
    //Initialize Interrupt for rising and falling edge
    pound.rise(&pON);
    pound.fall(&pOFF);
    while(1) {
    }
}