Julian Roll
/
Bertl_Arbeit
Bertl bleibt auf Beeper
main.cpp
- Committer:
- Pouter123
- Date:
- 2015-04-30
- Revision:
- 0:20d132d4263d
File content as of revision 0:20d132d4263d:
#include "mbed.h" #include "ur_Bertl.h" #include "const.h" int main() { Bertl karel; while(1) { karel.RGBLed(0,0,1); uint8_t val = karel.GetLineValues(); karel.NibbleLeds(val); if(karel.NextToABeeper()) karel.Move(); while(!(karel.NextToABeeper())) { karel.RGBLed(1,0,0); karel.TurnRigth(); if(karel.NextToABeeper()) { karel.RGBLed(0,1,0); wait_ms(500); } } } // karel.Move(); /* karel.RGBLed(1,0,0); // red wait_ms(500); karel.RGBLed(0,1,0); // green wait_ms(500); karel.RGBLed(0,0,1); // blue wait_ms(500); */ }