Øving 4.2 Arben og Adrian

Dependencies:   mbed

main.cpp

Committer:
Smashftw
Date:
2017-09-20
Revision:
1:31fe0557741c
Parent:
0:0887fcb9e2eb
Child:
2:e9d2e03e1b8c

File content as of revision 1:31fe0557741c:

#include "mbed.h"
Ticker Mytick;
BusOut teller(LED1, LED2, LED3, LED4);
volatile int Countup = 0;
 
void myTickerFunc()
{
    Countup++;
    if(Countup == 16) {
        Countup = 0;
    }
}
int main()
{
    Mytick.attach(&myTickerFunc, 2.0);
    while(1) {
        teller = Countup;
    }
}