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 _Lektion_02e by
main.cpp
- Committer:
- Enenkel
- Date:
- 2015-03-06
- Revision:
- 0:f61110000c3b
- Child:
- 1:60247c53e9f8
File content as of revision 0:f61110000c3b:
#include "mbed.h" // HIMBED Lektion_02e "Lauflicht über 12 LED mit 2 LED via BUS" // BULME Graz, 2014-02-09, by Enekel // AUFGABE: 1) Kopiere diese Software in ein neues Programm // und gib diesem Programm deinen Namen ! // 2) Verändere sie so, dass ein Lauflicht über 12 LED ensteht. // Je 2 LED sollen hin und her laufen über alle 12 LED // Am Anfang und am Ende darf kein LED leuchten ! // Verwende dazu einen BUS. // DEFINITIONEN ************************************************* BusOut led(P1_13,P1_12,P1_7,P1_6,P1_4,P1_3,P1_1,P1_0,LED4,LED3,LED2,LED1); // LSB MSB // HAUPTPROGRAMM *********************************************** int main() { myled=0xFFFF; // Alle 12 LED EIN wait(1); // warte 1 sec. while(1) { led=0x0000; //LED 0000 0000 00000 wait 0.2; // 0000 0000 00001 // 0000 0000 00011 // 0000 0000 00110 // 0000 0000 01100 // 0000 0000 11000 // 0000 0001 10000 // usw // wieder zurück ! ! } } // ENDE *****************************************************