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.
Diff: main.cpp
- Revision:
- 0:f53860730a45
- Child:
- 1:2849454dd0ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jan 31 16:59:51 2022 +0000
@@ -0,0 +1,27 @@
+/* mbed BuschA
+ */
+
+#include "mbed.h"
+
+DigitalIn CableSwitch(D2); //PullUp auf Board, PA_10
+PwmOut M1_PWM(D9);
+DigitalOut M1_DIR(D7);
+
+
+int main()
+{
+ M1_PWM.period_ms(10); // PWM-Periode
+ while (1)
+ {
+ if (CableSwitch == false)
+ {
+ M1_DIR = 1;
+ M1_PWM = 0.5; //Tastgrad 0-1
+ }
+ else
+ {
+ M1_DIR = 1;
+ M1_PWM = 0.95;
+ }
+ }
+}
\ No newline at end of file