![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Übung
Diff: main.cpp
- Revision:
- 0:0061676da890
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Dec 21 14:40:23 2015 +0000 @@ -0,0 +1,81 @@ +#include "mbed.h" +#include "const.h" +#include "Robot.h" + +Robot bertl; + +void AufKnopfdruckWarten() +{ + bertl.WaitUntilButtonPressed(); +} +void NichtsVorDemBertl() +{ + bertl.FrontIsClear(); +} +void NebenDemBeeper() +{ + bertl.NextToABeeper(); +} +void KnopfGedrueckt(const int btn) +{ + bertl.IsButtonPressed(btn); +} +int WelcherKnopf() +{ + bertl.ReturnButtonPressed(); +} +void NachVor() +{ + bertl.Move(); +} +void Links() +{ + bertl.TurnLeft(); +} +void OrangeLeds(int x) +{ + bertl.NibbleLeds(x); +} +void LedAn(int16_t a) +{ + bertl.TurnLedOn(a); +} +void LedAus(int16_t b) +{ + bertl.TurnLedOff(b); +} +void Bunt(bool rot, bool gruen, bool blau) +{ + bertl.RGBLed(rot, gruen, blau); +} +void BlaueLedsAn() +{ + bertl.BlueLedsON(); +} +void BlaueLedsAus() +{ + bertl.BlueLedsOFF(); +} + +//---------------------------------------------------------------------------------------------------------------------------------------------// + +int main() +{ + NachVor(); + Links(); + NachVor(); + Links(); + NachVor(); + Links(); + NachVor(); + Links(); + BlaueLedsAn(); + NachVor(); + BlaueLedsAus(); + Links(); + Links(); + Links(); + Links(); + + +} \ No newline at end of file