#include "mbed.h"


InterruptIn mybutton(USER_BUTTON);
int counter;
DigitalOut power(PA_0);
BusOut sedmoseg(PA_4, PA_1, PB_10, PA_8, PC_0, PC_1, PB_0);
int LUT[5] = {0b0000001, 0b1001111, 0b0010010, 0b0000110, 0b1001100};


void prekidnarutina()
{
    if (counter==9)
        counter = 0;
    else
        counter++;
    sedmoseg = LUT[counter];
}

int main()
{
    power = 1;
    counter = 0;
    mybutton.fall(&prekidnarutina);
    while(1) {
        
    }
}
