tim008 tim008
/
LV2_Grupa5_Tim008_zadatak1
Amela Špica Emir Mujačić
main.cpp
- Committer:
- tim008
- Date:
- 2014-03-13
- Revision:
- 0:f5a06e3e118f
File content as of revision 0:f5a06e3e118f:
#include "mbed.h" BusOut led(dp23, dp24, dp25, dp26, dp27, dp5, dp6, dp28); DigitalOut enabled(dp14); DigitalIn taster(dp1); int main() { int brojac = 0; enabled = 0; led = brojac; while(1) { if (taster==0) brojac++; else brojac--; if (brojac < 0) brojac = 255; if (brojac > 255) brojac = 0; led= brojac; wait(1); } }