![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Bertluebung
Dependencies: BertlUebung mbed
Diff: main.cpp
- Revision:
- 0:86b729f5ece3
diff -r 000000000000 -r 86b729f5ece3 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 21 14:37:01 2015 +0000 @@ -0,0 +1,89 @@ +#include "mbed.h" +#include "const.h" +#include "Robot.h" + +Robot bertl; + +void WarteAufAktion() +{ + bertl.WaitUntilButtonPressed(); +} + +void NichtsVorBertl() +{ + bertl.FrontIsClear(); +} + +void NebenBeeper() +{ + bertl.NextToABeeper(); +} + +void KnopfGedrueckt(const int btn) +{ + bertl.IsButtonPressed(btn); +} + +int WelcherKnopf() +{ + bertl.ReturnButtonPressed(); +} + +void Bewege() +{ + bertl.Move(); +} + +void DreheLinks() +{ + bertl.TurnLeft(); +} + +void Karusell(); +{ + for(int a = 10; a > 0; a++) + bertl.TurnLeft(); +} + +void LedLeiste(int a) +{ + bertl.NibbleLeds(a); +} + +void LedsEin(int16_t a) +{ + bertl.TurnLedOn(a); +} + +void LedsAus(int16_t a) +{ + bertl.TurnLedOff(a); +} + +void BunteLed(bool r, bool g, bool b) +{ + bertl.RGBLed(r,g,b); +} + +void BlaueLedsAn() +{ + bertl.BlueLedsON(); +} + +void BlaueLedsAus() +{ + bertl.BlueLedsOFF(); +} + +int main() +{ + + Bewege(); + for (int a = 5; a > 0; a++) + { + BlaueLedsAn(); + BlaueLedsAus(); + } + Karusell(); + +} \ No newline at end of file