Testprogramm für BERTL 2014, der BULME Graz/Gösting. Der BERTL dreht sich für 1s, danach steht er für 1s
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 /*********************************** 00002 name: BERTL_2014_MOTOR_1 00003 author: Wolfgang Raimann 00004 email: rai@bulme.at 00005 description: 00006 Der Bertl dreht sich im Kreis für 1s danach steht er für 1s 00007 ***********************************/ 00008 00009 #include "mbed.h" 00010 00011 DigitalOut MotorL_EN(p34); 00012 DigitalOut MotorL_FORWARD(P1_0); 00013 DigitalOut MotorL_REVERSE(P1_1); 00014 00015 DigitalOut MotorR_EN(p36); 00016 DigitalOut MotorR_FORWARD(P1_3); 00017 DigitalOut MotorR_REVERSE(P1_4); 00018 00019 int main() { 00020 MotorL_FORWARD = MotorR_REVERSE = 1; 00021 while(1) { 00022 MotorL_EN = MotorR_EN = 1; 00023 wait(1); 00024 MotorL_EN = MotorR_EN = 0; 00025 wait(1); 00026 } 00027 }
Generated on Thu Jul 14 2022 16:41:38 by
1.7.2