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: const.h
- Revision:
- 15:43d6a7e6e64a
- Parent:
- 13:3ce84646fd74
- Child:
- 17:308802267a62
diff -r 3ce84646fd74 -r 43d6a7e6e64a const.h --- a/const.h Mon Apr 27 13:13:45 2015 +0000 +++ b/const.h Fri May 08 08:39:12 2015 +0000 @@ -21,7 +21,7 @@ /*! \var int SPEED \brief Bertl speed 0.2 (slow) - 1.0 (fast). \warning speed below 0.2 possible the motor won't start */ -const float SPEED = 0.2; /* Bertl speed 0.2 (slow) - 1.0 (fast) */ +const float SPEED = 0.4; /* Bertl speed 0.2 (slow) - 1.0 (fast) */ /*! \var int DISTANCE \brief one wheel turn is appr. 24 ticks. \warning maybe the number has to be adjusted */ @@ -62,4 +62,5 @@ const int West = 2; const int North = 3; const int South = 4; + #endif \ No newline at end of file