tim008 tim008
/
L2-G1-Tim8-Z2
Lejla Agić Pajić Enil
main.cpp
- Committer:
- tim008
- Date:
- 2014-03-10
- Revision:
- 0:87b90179fb7d
File content as of revision 0:87b90179fb7d:
#include "mbed.h" BusOut l (dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28); DigitalOut e (dp14); DigitalIn t1 (dp1); DigitalIn t2 (dp2); int main() { e = 0; int x = 0; bool p = false; l = x; while(1) { l = (x + 1) % 256; wait (0.15); if (!p) { p = true; if (t1 == 1) x++; else if (t2 == 1) x--; } if (t1 == 0 && t2 == 0) p = false; } }