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
main.cpp
- Committer:
- Enenkel
- Date:
- 2014-11-13
- Revision:
- 0:0b7c22955b8c
- Child:
- 1:d0cca408dffe
File content as of revision 0:0b7c22955b8c:
/***********************************
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 *************