Øving 4.2 Arben og Adrian

Dependencies:   mbed

main.cpp

Committer:
Smashftw
Date:
2017-09-20
Revision:
2:e9d2e03e1b8c
Parent:
1:31fe0557741c

File content as of revision 2:e9d2e03e1b8c:

#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; //telle
    }
}