Stefan Seebacher
/
M0_Uebung_2f
M0_Übung_2f
Fork of M0_Lektion02f by
main.cpp
- Committer:
- StefanSeebacher
- Date:
- 2016-04-21
- Revision:
- 3:3b0264bdf220
- Parent:
- 2:19f9c4ff509b
File content as of revision 3:3b0264bdf220:
#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); // **** HAUPTPROGRAMM **** int main() { while(1) { led=0x000; //LED 0000 0000 0000 wait(0.2); led=0x001; //LED 0000 0000 0001 wait (0.2); led=0x003; //LED 0000 0000 0011 wait (0.2); led=0x007; //LED 0000 0000 0111 wait (0.2); led=0x00F; //LED 0000 0000 1111 wait (0.2); led=0x01E; //LED 0000 0001 1110 wait (0.2); led=0x03C; //LED 0000 0011 1100 wait (0.2); led=0x078; //LED 0000 0111 1000 wait (0.2); led=0x0F0; //LED 0000 1111 0000 wait (0.2); led=0x1E0; //LED 0001 1110 0000 wait (0.2); led=0x3C0; //LED 0011 1100 0000 wait (0.2); led=0x780; //LED 0111 1000 0000 wait (0.2); led=0xF00; //LED 1111 0000 0000 wait (0.2); led=0xE00; //LED 1110 0000 0000 wait (0.2); led=0xC00; //LED 1100 0000 0000 wait (0.2); led=0x800; //LED 1000 0000 0000 wait (0.2); led=0x000; //LED 0000 0000 0000 wait (0.2); // Zurück led=0x000; //LED 0000 0000 0000 wait (0.2); led=0x800; //LED 1000 0000 0000 wait (0.2); led=0xC00; //LED 1100 0000 0000 wait (0.2); led=0xE00; //LED 1110 0000 0000 wait (0.2); led=0xF00; //LED 1111 0000 0000 wait (0.2); led=0x780; //LED 0111 1000 0000 wait (0.2); led=0x3C0; //LED 0011 1100 0000 wait (0.2); led=0x1E0; //LED 0001 1110 0000 wait (0.2); led=0x0F0; //LED 0000 1111 0000 wait (0.2); led=0x078; //LED 0000 0111 1000 wait (0.2); led=0x03C; //LED 0000 0011 1100 wait (0.2); led=0x01E; //LED 0000 0001 1110 wait (0.2); led=0x00F; //LED 0000 0000 1111 wait (0.2); led=0x007; //LED 0000 0000 0111 wait (0.2); led=0x003; //LED 0000 0000 0011 wait (0.2); led=0x001; //LED 0000 0000 0001 wait (0.2); led=0x000; //LED 0000 0000 0000 wait(0.2); } } // **** ENDE ****