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.
Fork of MotorLib by
Diff: motor.cpp
- Revision:
- 0:bd05fd602a6e
- Child:
- 1:9519ac966b79
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/motor.cpp Fri Jun 17 11:16:07 2016 +0000
@@ -0,0 +1,15 @@
+#include "motor.h"
+
+
+
+Motor::Motor(PinName _MPh0, PinName _MPh1, PinName _MPh2, PinName _MPh3):DigitalOut(_MPh0), DigitalOut(_MPh1), DigitalOut(_MPh2), DigitalOut(_MPh3) {
+
+ MotorIndex = 0;
+
+}
+
+void Motor::StopMotor() // --- Stop Motor
+{
+ MPh0 = 0; MPh1 = 0; MPh2 = 0; MPh3 = 0;
+ MotorIndex = 0;
+}
\ No newline at end of file
