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.
Dependencies: mbed
Fork of _B14Test6 by
Diff: main.cpp
- Revision:
- 0:0b7c22955b8c
- Child:
- 1:d0cca408dffe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Nov 13 18:19:47 2014 +0000
@@ -0,0 +1,34 @@
+/***********************************
+name: BERTL_2014_TEST
+author: Gottfried Enenkel HTL BULME
+email: ene@bulme.at
+description:
+ Der BERTL fährt 1 sec lang VORWÄRTS!
+ Danach steht er für 1 sec
+
+ Wenn an auf den Moter sieht, ist da + Zeichen
+ immer LINKS OBEN zu sehen !
+***********************************/
+#include "mbed.h"
+
+// ************ DEKLARATIONEN **************
+DigitalOut MotorL_EN(p34);
+DigitalOut MotorL_FORWARD(P1_1);
+DigitalOut MotorL_REVERSE(P1_0);
+
+DigitalOut MotorR_EN(p36);
+DigitalOut MotorR_FORWARD(P1_3);
+DigitalOut MotorR_REVERSE(P1_4);
+
+// ************* Hauptprogramm ************
+int main() { // Start Hauptprogramm
+ MotorR_EN=MotorL_EN=1; // Beide Motoren ENABLE
+ while(1) { // Anfang der Schleife (ohne Abbruch)
+ MotorR_FORWARD = MotorL_FORWARD = 1; // Beide Motoren vorwärts EIN
+ wait (1); // warte 1 Sekunde
+ MotorR_FORWARD = MotorL_FORWARD = 0; // Motoren AUS
+ wait (1); // warte 1 Sekunde
+ } // Springe zum Anfang der Schleife
+}
+
+// ************** ENDE *************
