100_robot_H_Bridge8835_UserButton_DIR_AA

Revision:
0:b779bcf836fa
Child:
1:9607517715ab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jan 31 06:12:30 2022 +0000
@@ -0,0 +1,27 @@
+/* mbed BuschA
+ */
+
+#include "mbed.h"
+
+DigitalIn CableSwitch(D2); //PullUp auf Board, PA_10
+
+DigitalOut M1_DIR(D7);
+DigitalOut M1_PWM(D9);
+
+int main()
+{
+ 
+    while (1) 
+    {
+    if (CableSwitch == false)
+        {
+        M1_DIR = 1;
+        M1_PWM = 1;
+        }
+    else
+        {
+        M1_DIR = 0;
+        M1_PWM = 1;
+        }
+    }
+}
\ No newline at end of file