Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:4ea668aba5b0, committed 2015-05-08
- Comitter:
- zwiebelturm100
- Date:
- Fri May 08 08:00:18 2015 +0000
- Commit message:
- DeutscherRoboter
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LED_Bertl.cpp Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" +#include "LED_Bertl.h" + +void LED_Bertl :: Turn2LedOn() +{ + TurnLedOn(LED_FL1 | LED_FR1); // OR-Verknüpfung der beiden LEDs + // 0000 0001 + // 0000 0000 OR + // 0000 0101 5 oder 0x5 + +} + +void LED_Bertl :: Turn2LedOff() +{ + TurnLedOff(LED_FL1 | LED_FR1); +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LED_Bertl.h Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" + +#ifndef DE_BERTL_H +#define LED_BERTL_H + +class LED_Bertl : public de_Bertl +{ +public: + void Turn2LedOn(); + void Turn2LedOff(); + +}; +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/de_Bertl.cpp Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" + + + +void de_Bertl :: Turn2LedsOn() +{ + TurnLedOn(LED_FL1 | LED_FR1); // OR-Verknüpfung der beiden LEDs + // 0000 0001 + // 0000 0000 OR + // 0000 0101 5 oder 0x5 + +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/de_Bertl.h Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,14 @@ +#include "mbed.h" +#include "ur_Bertl.h" +#include "const.h" + +#ifndef DE_BERTL +#define DE_BERTL + +class de_Bertl : public ur_Bertl +{ +public: + void Bewege(); // nur Deklaration= Ptototyping + void Turn2LedsOn(); +}; +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,64 @@ +// Datei: main.cpp +#include "mbed.h" +#include "ur_Bertl.h" +#include "de_Bertl.h" +#include "LED_Bertl.h" +#include "const.h" + +// in eigene Dateien: Klassen-/Methodendeklaration in de_Bertl.h +// Methodendefinition in de_Bertl.cpp + +Serial bt(p9, p10) // Kommunizieren + + +/*void de_Bertl :: Bewege() // Definieren +{ + Move(); +} + */ +int main() +{ + int xy =5; + char zeichen ; + + LED_Bertl karel; + + uint8_t val = karel; + int Beeper = 0; + int Moves = 0; + + while(true) { + bt.printf("Move time: %d, Beeper: %d\n", Moves, Beeper); + + while(Beeper != 3) + { + while(!karel.NextToABeeper) + { + karel.Move(); + Moves++; + } + Beeper++; + } + + While(!karel.FrontIsClear) + { + karel.Move(); + Move++; + } + + bt.printf("Move time: %d, Beeper: %d\n", Moves, Beeper); + + + + + } + + /* LED_Bertl karel; + karel.TurnLedOff(0xFF); + while(karel.WaitUntilButtonPressed()){} + karel.Turn2LedOn(); + karel.Bewege(); + karel.Move(); + karel.Turn2LedOff(); + karel.ShutOff(); */ +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7e07b6fb45cf \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ur_Bertl.lib Fri May 08 08:00:18 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/teams/BERTL_CHEL_18/code/ur_Bertl/#fafbac0ba96d