Fritz Hausmann
/
Bertl_DeutscherRoboter
DeutscherRoboter
Revision 0:a99d586ab184, committed 2015-04-23
- Comitter:
- fritzhausmann
- Date:
- Thu Apr 23 12:05:37 2015 +0000
- Commit message:
- DeutscherRoboter
Changed in this revision
diff -r 000000000000 -r a99d586ab184 Led_Bertl.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Led_Bertl.cpp Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,12 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" +#include "Led_Bertl.h" + +void Led_Bertl :: Turn2LedsOn() +{ + TurnLedOn(LED_FL1 | LED_FR1); // OR- Verknüpfung der beiden Klassen + // 0000 0001 + // 0000 0100 OR + // 0000 0101 5 oder 0x5 +} \ No newline at end of file
diff -r 000000000000 -r a99d586ab184 Led_Bertl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Led_Bertl.h Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,4 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" +
diff -r 000000000000 -r a99d586ab184 de_Bertl.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/de_Bertl.cpp Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,38 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" + +void de_Bertl :: Bewege() // Definition +{ + Move(); +} + +void de_Bertl :: DreheLinks() +{ + TurnLeft(); +} + +void de_Bertl :: LegePiepser() +{ + PutBeeper(); +} + +void de_Bertl :: NimmPiepser() +{ + PickBeeper(); +} + +void de_Bertl :: SchalteAus() +{ + ShutOff(); +} + +void de_Bertl :: BlaueLedsAN() +{ + BlueLedsON(); +} + +void de_Bertl :: BlaueLedsAUS() +{ + BlueLedsOFF(); +} \ No newline at end of file
diff -r 000000000000 -r a99d586ab184 de_Bertl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/de_Bertl.h Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "ur_Bertl.h" + +#ifndef DE_BERTL_H +#define DE_BERTL_H + +class de_Bertl : public ur_Bertl +{ + public: + void Bewege(); // nur Dekleration - Prototyping + void DreheLinks(); + void LegePiepser(); + void NimmPiepser(); + void SchalteAus(); + void BlaueLedsAN(); + void BlaueLedsAUS(); +}; +#endif \ No newline at end of file
diff -r 000000000000 -r a99d586ab184 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" +#include "Led_Bertl.h" +#include "de_Bertl.h" + +// in eigenen Dateien: Klassen-/ Methodendeklaration in de_Bertl.h Methodendefinition in de_Bertl.cpp + +int main() +{ + Led_Bertl karel; + + karel.TurnLedOff(0xFF); + while(karel.WaitUntilButtonPressed()){} + karel.Turn2LedsOn(); + karel.Bewege(); + karel.Move(); + karel.ShutOff(); +} \ No newline at end of file
diff -r 000000000000 -r a99d586ab184 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889 \ No newline at end of file
diff -r 000000000000 -r a99d586ab184 ur_Bertl.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Thu Apr 23 12:05:37 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#07e55b300ff1