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
Diff: main.cpp
- Revision:
- 7:edd065946e9b
- Parent:
- 6:688449345fff
- Child:
- 9:76e4808df4cb
--- a/main.cpp Wed Nov 22 05:56:05 2017 +0000
+++ b/main.cpp Wed Nov 22 06:58:41 2017 +0000
@@ -18,10 +18,10 @@
InterruptIn cM2_1(PA_1);
InterruptIn cM2_2(PC_4);
-DigitalOut M1F(PC_7); //motor direction and speed control
-DigitalOut M2B(PA_7);
-DigitalOut M1B(PB_10);
-DigitalOut M2F(PB_6);
+PwmOut M1F(PC_7); //motor direction and speed control
+PwmOut M2B(PA_7);
+PwmOut M1B(PB_10);
+PwmOut M2F(PB_6);
Serial pc(SERIAL_TX, SERIAL_RX);
volatile unsigned long counterM1 = 1; // counter for hall sensors
@@ -38,8 +38,6 @@
int main()
{
-
-
M1B.write(0);
M2B.write(0);
M1F.write(0);