selma tucak edis kunic

Dependencies:   mbed

Fork of zadatak2 by tim003 tim003

main.cpp

Committer:
tim003
Date:
2014-03-13
Revision:
0:0a243510fd7b
Child:
1:a38e1e4a66f2

File content as of revision 0:0a243510fd7b:

#include "mbed.h"

BusOut myled(dp23,dp24,dp25,dp26,dp5,dp6,dp28);
DigitalOut enable(dp14);
DigitalIn taster1(dp1);
int main() {
    enable=0;
    int brojac=0;
    myled=0;
    while(1) {
        if( taster1==1){
            if(brojac==0){
                brojac=255;
            }
            myled=brojac;
            wait(0.25);
            brojac--;
        }
        if(taster1==0){
            if(brojac==255)brojac=0;
            myled=brojac;
            wait(0.25);
            brojac++;
        }
    }
}