Filip Putz
/
BertlMove
Übung
main.cpp
- Committer:
- Putzi
- Date:
- 2015-12-21
- Revision:
- 0:0061676da890
File content as of revision 0:0061676da890:
#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(); }