Leds work simultanously. Version 3.1
Dependents: bertl_led bertl_led bertl_led bertl_led ... more
Fork of Bertl by
BULME HTL Graz-Gösting
FSST - Hardwarenahe Programmierung
Created by Prof.Dr. Franz Pucher
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); } } }
Diff: ur_Bertl.h
- Revision:
- 1:fafbac0ba96d
- Parent:
- 0:66e9a0afcbd6
- Child:
- 4:76acfddc26fb
diff -r 66e9a0afcbd6 -r fafbac0ba96d ur_Bertl.h --- a/ur_Bertl.h Thu Feb 26 10:12:06 2015 +0000 +++ b/ur_Bertl.h Thu Mar 19 19:12:33 2015 +0000 @@ -116,6 +116,7 @@ void TurnLeft(); /**< Robot turns left as much as the constant ANGLE*/ void PutBeeper(); /**< if Robot has any Beepers in his bag he can put one or more Beeper; if not --> Error(()*/ void PickBeeper(); /**< if Robot stands on a black item he can pick one or more Beeper (max. 16 --> Error()); if not --> Error()*/ + bool FrontIsClear(); /**< returns a boolean value true if front is free; if not false */ void NibbleLeds(int value); /**< methode for the 4 (half byte) yellow LEDs at the back left side */ void TurnLedOn(int16_t led);/**< turns the specified one or more LEDs ON; description and name in const.h, such as LED_FL1 = 0x01; front LED white */ void TurnLedOff(int16_t led);/**< turns the specified one or more LEDs OFF; description and name in const.h, such as LED_FL1 = 0x01; front LED white */