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.
main.cpp
- Committer:
- MartinWeber
- Date:
- 2014-05-21
- Revision:
- 0:78eeb27924f4
File content as of revision 0:78eeb27924f4:
#include "mbed.h"
#include "C12832_lcd.h"
C12832_LCD lcd;
BusOut myleds(LED1, LED2, LED3, LED4);
InterruptIn button_up(p15);
InterruptIn button_down(p12);
InterruptIn button_left(p13);
int i = 0;
void out()
{
    myleds = i;    
}
void count()
{
    i++;
    out();
}
void discount()
{
    i--;
    out();
}
void clear()
{
    i = 0;
    out();
}
int main() 
{
    button_up.rise(&count);
    button_down.fall(&discount);
    button_left.rise(&clear);
  
    while(1)
    {}
}