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:
- 9:fc3a7ad346e6
- Parent:
- 8:07e55b300ff1
- Child:
- 10:207a1e646191
diff -r 07e55b300ff1 -r fc3a7ad346e6 const.h --- a/const.h Fri Apr 17 06:59:34 2015 +0000 +++ b/const.h Thu Apr 23 12:38:29 2015 +0000 @@ -20,7 +20,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.3; /* 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 */