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:
- 15:43d6a7e6e64a
- Parent:
- 13:3ce84646fd74
- Child:
- 16:9ec833d98d0d
diff -r 3ce84646fd74 -r 43d6a7e6e64a ur_Bertl.h --- a/ur_Bertl.h Mon Apr 27 13:13:45 2015 +0000 +++ b/ur_Bertl.h Fri May 08 08:39:12 2015 +0000 @@ -148,11 +148,11 @@ ur_Bertl(PinName pin); /**< parameterized constructor; on what pin should the interrupt work; SPEED, DISTANCE or ANGLE have to bee defined in config.h */ //void Move(); /**< Robot moves one turn as much as the constant DISTANCE; if one of the buttons fire --> Error()*/ - void Move(int move = MOVE); /**< Robot moves one turn as much as the constant DISTANCE; if one of the buttons fire --> Error()*/ + void Move(); /**< Robot moves one turn as much as the constant DISTANCE; if one of the buttons fire --> Error()*/ 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. 15 --> Error()); if not --> Error()*/ - void ShutOff(); /**< turnes the robot off */ + void TurnOff(); /**< turnes the robot off */ bool WaitUntilButtonPressed(); /**< wait until any button is pressed at the robot */ bool FrontIsClear(); /**< returns a boolean value true if front is free; if not false */ bool NextToABeeper(); /**< returns a boolean value true if the robot is on a black place or line; if not --> false */