Button Press on Vibro Model

Dependencies:   mbed

main.cpp

Committer:
mfillinois
Date:
2014-11-05
Revision:
0:7b26ada49c8f

File content as of revision 0:7b26ada49c8f:

#include "mbed.h"

DigitalOut ledB(LED1);
InterruptIn button1(p15);

void lighton()
{
    ledB = 0;
}
void lightoff()
{
    ledB = 1;
}

int main()
{
    ledB = 1;
    button1.mode(PullUp);
    button1.fall(&lighton);
    button1.rise(&lightoff);
    while(1)
    {
        
    }
}