Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of M0_Lektion02f by
main.cpp
00001 #include "mbed.h" 00002 00003 // **** DEFINITIONEN **** 00004 00005 BusOut led(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1); 00006 00007 // **** HAUPTPROGRAMM **** 00008 00009 int main() { 00010 while(1) 00011 { 00012 led=0x000; //LED 0000 0000 0000 00013 wait(0.2); 00014 led=0x001; //LED 0000 0000 0001 00015 wait (0.2); 00016 led=0x003; //LED 0000 0000 0011 00017 wait (0.2); 00018 led=0x007; //LED 0000 0000 0111 00019 wait (0.2); 00020 led=0x00F; //LED 0000 0000 1111 00021 wait (0.2); 00022 led=0x01E; //LED 0000 0001 1110 00023 wait (0.2); 00024 led=0x03C; //LED 0000 0011 1100 00025 wait (0.2); 00026 led=0x078; //LED 0000 0111 1000 00027 wait (0.2); 00028 led=0x0F0; //LED 0000 1111 0000 00029 wait (0.2); 00030 led=0x1E0; //LED 0001 1110 0000 00031 wait (0.2); 00032 led=0x3C0; //LED 0011 1100 0000 00033 wait (0.2); 00034 led=0x780; //LED 0111 1000 0000 00035 wait (0.2); 00036 led=0xF00; //LED 1111 0000 0000 00037 wait (0.2); 00038 led=0xE00; //LED 1110 0000 0000 00039 wait (0.2); 00040 led=0xC00; //LED 1100 0000 0000 00041 wait (0.2); 00042 led=0x800; //LED 1000 0000 0000 00043 wait (0.2); 00044 led=0x000; //LED 0000 0000 0000 00045 wait (0.2); 00046 00047 // Zurück 00048 00049 led=0x000; //LED 0000 0000 0000 00050 wait (0.2); 00051 led=0x800; //LED 1000 0000 0000 00052 wait (0.2); 00053 led=0xC00; //LED 1100 0000 0000 00054 wait (0.2); 00055 led=0xE00; //LED 1110 0000 0000 00056 wait (0.2); 00057 led=0xF00; //LED 1111 0000 0000 00058 wait (0.2); 00059 led=0x780; //LED 0111 1000 0000 00060 wait (0.2); 00061 led=0x3C0; //LED 0011 1100 0000 00062 wait (0.2); 00063 led=0x1E0; //LED 0001 1110 0000 00064 wait (0.2); 00065 led=0x0F0; //LED 0000 1111 0000 00066 wait (0.2); 00067 led=0x078; //LED 0000 0111 1000 00068 wait (0.2); 00069 led=0x03C; //LED 0000 0011 1100 00070 wait (0.2); 00071 led=0x01E; //LED 0000 0001 1110 00072 wait (0.2); 00073 led=0x00F; //LED 0000 0000 1111 00074 wait (0.2); 00075 led=0x007; //LED 0000 0000 0111 00076 wait (0.2); 00077 led=0x003; //LED 0000 0000 0011 00078 wait (0.2); 00079 led=0x001; //LED 0000 0000 0001 00080 wait (0.2); 00081 led=0x000; //LED 0000 0000 0000 00082 wait(0.2); 00083 00084 } 00085 } 00086 // **** ENDE ****
Generated on Sat Sep 3 2022 09:02:08 by
1.7.2
