Oppgave 6.1

Dependencies:   mbed

main.cpp

Committer:
Smashftw
Date:
2017-10-03
Revision:
0:1dc7ec39a877

File content as of revision 0:1dc7ec39a877:

#include "mbed.h"

BusOut ledNS (p7, p6, p5); // Grønn, Gul, Rød
BusOut ledOV (p10, p9, p8); // Grønn, Gul, Rød
int lysNS[8] = {1, 1, 1, 3, 4, 2, 1, 1};
int lysOV[8] = {4, 2, 1, 1, 1, 1 ,1, 3};
int ventetid[8] = {5000, 2000, 1000, 500, 5000, 2000, 1000, 500};
int main()
{
    while(1) {


        for (int i=0; i<8; i++) {

            ledNS = lysNS[i];
            ledOV = lysOV[i];
            wait_ms (ventetid[i]);

        }

    }
}