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: config.h
- Revision:
- 12:cedc088eaf05
- Parent:
- 4:76acfddc26fb
- Child:
- 13:3ce84646fd74
diff -r 155ce3832f01 -r cedc088eaf05 config.h --- a/config.h Fri Apr 24 09:16:40 2015 +0000 +++ b/config.h Sun Apr 26 20:04:47 2015 +0000 @@ -16,10 +16,10 @@ /*! \def DEBUG \brief Turns debugging infos off (0) and on (3) which are send to serial pc.uart */ #define DEBUG 0 -#define FRONTBUTTON /**< Error shutoff if Bertl moves against a wall*/ +//#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 */ +BusOut NibbleLEDs(P1_8, P1_9, P1_10, P1_11); /**< 4 yellow LEDs as a bus defined; use it i.e.: karel.NibbleLeds(karel.GetLineValues()); to show line sensor values */ DigitalOut LED_D10(P1_8); /**< wiring first LED_D10 */ DigitalOut LED_D11(P1_9); /**< wiring second LED_D11 */ DigitalOut LED_D12(P1_10); /**< wiring thired LED_D12 */