BULME_AHEL18 / Mbed 2 deprecated BERTL_B14_Lektion02d

Dependencies:   mbed

Fork of _B14_Lektion02d by BULME_BERTL14

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /***********************************
00002 name:   _B14_Lektion02d     Lauflicht via BUS
00003 author: Gottfried Enenkel   HTL BULME
00004 date:   15.3.2015
00005 Aufgabe:
00006     Lade die Software, führe sie aus.
00007     Verändere die Software so, dass folgendes Lauflicht entsteht 
00008     D10 D11 D12 D13
00009     -   -   -   -       Ein Durchgang dauert 4 sec
00010     X   -   -   -       X=ON  - = off
00011     X   X   -   - 
00012     X   X   X   -
00013     X   X   X   X
00014     X   X   X   -
00015     X   X   -   -
00016     X
00017     Start erneut mit  -   -   -   -  
00018 **********************************/
00019 #include "mbed.h"
00020 // *******   Definitionen  ********
00021 // Statt DigitalOut wird nun BusOut verwendet !
00022 BusOut leds(P1_8, P1_9, P1_10, P1_11);   //LEDS als Bus definieren
00023 
00024 // *******   Hauptroutine  ********
00025 int main() {                 // 0x bedeutet eine HEX Zahl folgt (0-F)
00026     while(1) {               // Alle LED ein >  0xF;     8 4 2 1  
00027         leds = 0x0;          // Alle LED aus    0x0;  Alle LED EIN > 0xF;
00028         wait(0.5);           // 8 4 2 1  Wert
00029         
00030         // füge hier deine Software ein !
00031         }                    // Springe zum Anfang der Schleife 
00032 }                            // Ende Hauptprogramm  
00033 // *******      Ende       *********
00034 
00035 
00036