Lejla Agić Pajić Enil

Dependencies:   mbed

Committer:
tim008
Date:
Mon Mar 10 07:41:45 2014 +0000
Revision:
0:ff2a62b05963
LV2 - G1 - Tim008 - Zad1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tim008 0:ff2a62b05963 1 #include "mbed.h"
tim008 0:ff2a62b05963 2
tim008 0:ff2a62b05963 3 BusOut l (dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28);
tim008 0:ff2a62b05963 4 DigitalOut e (dp14);
tim008 0:ff2a62b05963 5 DigitalIn s (dp1);
tim008 0:ff2a62b05963 6 int main() {
tim008 0:ff2a62b05963 7 e = 0;
tim008 0:ff2a62b05963 8 int x = 0;
tim008 0:ff2a62b05963 9 l = x;
tim008 0:ff2a62b05963 10 while(1) {
tim008 0:ff2a62b05963 11 l = (x + 1) % 256;
tim008 0:ff2a62b05963 12 wait (1.0);
tim008 0:ff2a62b05963 13 if (s == 1) x--;
tim008 0:ff2a62b05963 14 else x++;
tim008 0:ff2a62b05963 15 }
tim008 0:ff2a62b05963 16 }