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:
1:fafbac0ba96d
Parent:
0:66e9a0afcbd6
Child:
4:76acfddc26fb
diff -r 66e9a0afcbd6 -r fafbac0ba96d config.h
--- a/config.h	Thu Feb 26 10:12:06 2015 +0000
+++ b/config.h	Thu Mar 19 19:12:33 2015 +0000
@@ -16,7 +16,8 @@
 /*! \def DEBUG
 \brief Turns debugging infos off (0) and on (3) which are send to serial pc.uart */
 #define DEBUG 0
-//#define FRONTBUTTON
+#define FRONTBUTTON     /**< Error shutoff if Bertl moves against a wall*/
+#define HCSR            /**< if ultrsonic is installed*/
 
 BusOut NibbleLEDs(P1_8, P1_9, P1_10, P1_11);   /**< 4 yellow LEDs as a bus defined */
 DigitalOut LED_D10(P1_8);    /**<  wiring first LED_D10 */