Leds work simultanously. Version 3.1

Dependencies:   HCSR

Dependents:   bertl_led bertl_led bertl_led bertl_led ... more

Fork of Bertl by Bertl_Team_PE

BULME HTL Graz-Gösting

FSST - Hardwarenahe Programmierung

Created by Prof.Dr. Franz Pucher

Inhalt

Inhalt

Start mit folgendem Code in main.cpp eines neuen Projektes mbed_blinky:

#include "mbed.h"
#include "const.h"
#include "Robot.h"

Robot bertl;
    
int main()
{
    bertl.NibbleLeds(0x0F);
    wait(1);
    bertl.NibbleLeds(0x00);
    
    while(1)
    {
        if(bertl.IsButtonPressed(BTN_BL))
        {
            bertl.TurnLedOn(LED_BL1);
        }
        if(bertl.IsButtonPressed(BTN_BR))
        {
            bertl.TurnLedOff(LED_BL1);
        }
    }
}
Revision:
17:308802267a62
Parent:
12:cedc088eaf05
Child:
18:e9bb4513ae3a
--- a/Robot.h	Thu Nov 12 09:05:05 2015 +0000
+++ b/Robot.h	Thu Nov 12 19:05:56 2015 +0000
@@ -31,5 +31,6 @@
     bool facingEast();       // is the robot facing East?
     bool facingWest();       // is the robot facing West?
     bool anyBeepersInBeeperBag();    //are there any beepers in the bag?
-};
+    
+ };
 #endif
\ No newline at end of file