Collinz is a bo$$_17
/
GCAWLINNNNNNNNZZZ
LED/level code
main.cpp
- Committer:
- alphasig
- Date:
- 2014-10-16
- Revision:
- 0:ac6957e368c3
- Child:
- 1:9e0c8f9c58b8
File content as of revision 0:ac6957e368c3:
#include "mbed.h" DigitalIn sw1(p16); DigitalIn sw2(p17); DigitalIn sw3(p18); DigitalIn sw4(p19); BusOut LED(p5,p6,p7,p8,p11); int switch1=sw1; int switch2=sw2; int switch3=sw3; int switch4=sw4; int main() { LED=1; while(1) { while (switch1==1) { LED=rand()%65; wait(.5); } while (switch2==1) { LED=rand()%65; wait(.2); } while (switch3==1) { LED=rand()%65; wait(.1); } while (switch4==1) { LED=rand()%65; wait(.05); } } }