Omerovic Mirza, Keco Armin

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 BusOut myleds (dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28);
00004 DigitalOut enable (dp14);
00005 DigitalIn taster1 (dp1);
00006 int main() {
00007     enable = 0;
00008     int x = 0;
00009     myleds = x;
00010     while(1) {
00011         myleds = (x + 1) % 256;
00012         wait (1);
00013         if (taster1 == 1) x--; 
00014         else x++;
00015 
00016     }
00017 }