Stefan Seebacher
/
M0_Uebung_5
M0_Übung_5
Fork of M0_Lektion05 by
main.cpp
- Committer:
- StefanSeebacher
- Date:
- 2016-04-21
- Revision:
- 1:d62ca09b4171
- Parent:
- 0:56dbb8ec442b
File content as of revision 1:d62ca09b4171:
#include "mbed.h" // **** DEFINITIONEN **** BusOut led(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1); int I; double X; // **** HAUPTPROGRAMM **** int main() { I=1; X=2; while(I<=5) { led=0x000; //LED **** **** **** 0000 0000 0000 wait(X); X=X*0.999; led=0x001; //LED **** **** ***X 0000 0000 0001 wait (X); X=X*0.999; led=0x002; //LED **** **** **X* 0000 0000 0010 wait (X); X=X*0.999; led=0x004; //LED **** **** *X** 0000 0000 0100 wait (X); X=X*0.999; led=0x008; //LED **** **** X*** 0000 0000 1000 wait (X); X=X*0.999; led=0x010; //LED **** ***X **** 0000 0001 0000 wait (X); X=X*0.999; led=0x020; //LED **** **X* **** 0000 0010 0000 wait (X); X=X*0.999; led=0x040; //LED **** *X** **** 0000 0100 0000 wait (X); X=X*0.999; led=0x080; //LED **** X*** **** 0000 1000 0000 wait (X); X=X*0.999; led=0x100; //LED ***X **** **** 0001 0000 0000 wait (X); X=X*0.999; led=0x200; //LED **X* **** **** 0010 0000 0000 wait (X); X=X*0.999; led=0x400; //LED *X** **** **** 0100 0000 0000 wait (X); X=X*0.999; led=0x800; //LED X*** **** **** 1000 0000 0000 wait (X); X=X*0.999; led=0x000; //LED **** **** **** 0000 0000 0000 wait (X); X=X*0.999; I++; } } // **** ENDE ****