Eigene Funktionen

Dependencies:   EigeneFunktionen mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "const.h"
00003 #include "Robot.h"
00004 #include "ur_Bertl.h"
00005 
00006 Robot bertl;
00007 
00008 void Bewegen()
00009 {
00010     bertl.Move();
00011     
00012 }
00013 
00014 
00015 void Links()
00016 {
00017     bertl.TurnLeft();
00018     
00019 }
00020 
00021 
00022 
00023 void NibbleLichter(int value)
00024 {
00025     
00026     bertl.NibbleLeds(value);
00027     
00028 }
00029 
00030 
00031 void LichterAN(int16_t led)
00032 
00033 {
00034     bertl.TurnLedOn(led);
00035     
00036 }
00037 
00038 
00039 
00040 
00041 void LichterAUS(int16_t led)
00042 
00043 {
00044     bertl.TurnLedOff(led);
00045     
00046 }
00047 
00048 
00049 
00050 
00051 void RGBLichter (bool rot, bool gruen, bool blau)
00052 {
00053     
00054     bertl.RGBLed(rot,gruen,blau);
00055     
00056 }
00057 
00058 void BlauAN()
00059 
00060     {
00061     bertl.BlueLedsON();
00062     
00063     
00064     }
00065 
00066 void BlauAus()
00067 
00068     {
00069          bertl.BlueLedsOFF();
00070     }
00071 
00072 bool SchwarzeLinie(bool ein)
00073 
00074 {
00075 
00076  return bertl.NextToABeeper();
00077 
00078 
00079 
00080 }
00081     
00082 int main() 
00083 {
00084    while(1)
00085    
00086    {
00087        if(bertl.IsButtonPressed(BTN_BL))
00088          {
00089             BlauAN(); 
00090         }
00091             
00092        
00093         
00094             
00095      }
00096 }