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:91e9dc4737ca, committed 2016-06-06
- Comitter:
 - georgjonak
 - Date:
 - Mon Jun 06 11:43:54 2016 +0000
 - Commit message:
 - Dreht um bei ber?hrung;
 
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file | 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 06 11:43:54 2016 +0000
@@ -0,0 +1,130 @@
+#include "mbed.h"
+
+DigitalOut Von (P2_13);           // Motor Spannung ab BERTL15 nötig !
+DigitalOut MotorL_EN(P1_19);      // Enable        OB DIE LINKS ODER RECHTS IST NOCH NICHT KLAR !    
+DigitalOut MotorL_FORWARD(P2_14); // Forwerts  
+DigitalOut MotorL_REVERSE(P2_15); // Rückwerts  
+
+DigitalOut MotorR_EN(P2_19);      //Die Leitung führt zum Pin PO_21 am Prozessor
+DigitalOut MotorR_FORWARD(P2_21); //Die Leitung führt zum Pin P1_3 am Prozessor
+DigitalOut MotorR_REVERSE(P2_20);
+
+DigitalIn TA1 (P1_23);      
+DigitalIn TA2 (P1_24);
+DigitalIn TA3 (P1_25);
+DigitalIn TA4 (P1_26);
+DigitalIn TA5 (P1_27);      
+DigitalIn TA6 (P1_28);
+DigitalIn TA7 (P1_30);
+DigitalIn TA8 (P1_31);
+
+
+
+
+
+DigitalOut LedD6 (P1_14);      
+DigitalOut LedD7 (P1_15);
+DigitalOut LedD8 (P1_16);
+DigitalOut LedD9 (P1_17);
+
+
+int main() {                     // Start Hauptprogramm
+    Von=1;                       // Motor Spannung EIN
+    MotorR_EN=MotorL_EN=1; 
+    
+    while(1) {
+ 
+    if (TA8==1){                //ggf
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;
+    LedD7 = 1;
+    LedD9 = 1;
+        
+    }else  {
+    {
+           
+    LedD7 = 0;
+    LedD9 = 0;
+    MotorL_REVERSE=0;
+    MotorR_REVERSE=0;
+    MotorR_FORWARD=1;
+    MotorL_FORWARD=1;
+    wait(0.5);
+    MotorL_FORWARD=0;
+    wait(0.5);
+    MotorR_FORWARD=0;
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;  
+    }} 
+    
+    if (TA3==1){                //ggf
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;
+    LedD7 = 1;
+    LedD9 = 1;
+      
+    }else  {
+    {
+           
+    LedD7 = 0;
+    LedD9 = 0;
+    MotorL_REVERSE=0;
+    MotorR_REVERSE=0;
+    MotorR_FORWARD=1;
+    MotorL_FORWARD=1;
+    wait(0.5);
+    MotorL_FORWARD=0;
+    wait(0.5);
+    MotorR_FORWARD=0;
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;  
+    }} 
+    
+    if (TA7==1){                //ggf
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;
+    LedD7 = 1;
+    LedD9 = 1;
+       
+    }else  {
+    {
+            
+    LedD7 = 0;
+    LedD9 = 0;
+    MotorL_REVERSE=0;
+    MotorR_REVERSE=0;
+    MotorR_FORWARD=1;
+    MotorL_FORWARD=1;
+    wait(0.5);
+    MotorR_FORWARD=0;
+    wait(0.5);
+    MotorL_FORWARD=0;
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;  
+    }} 
+    
+     if (TA2==1){                //ggf
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;
+    LedD7 = 1;
+    LedD9 = 1;
+        
+    }else  {
+    {
+            
+    LedD7 = 0;
+    LedD9 = 0;
+    MotorL_REVERSE=0;
+    MotorR_REVERSE=0;
+    MotorR_FORWARD=1;
+    MotorL_FORWARD=1;
+    wait(0.5);
+    MotorR_FORWARD=0;
+    wait(0.5);
+    MotorL_FORWARD=0;
+    MotorL_REVERSE=1;
+    MotorR_REVERSE=1;  
+    }} 
+    
+   
+} }                               
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Jun 06 11:43:54 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file