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 Motordriver by
Diff: motordriver.cpp
- Revision:
- 6:8dc1d797f383
- Parent:
- 5:3110b9209d3c
diff -r 3110b9209d3c -r 8dc1d797f383 motordriver.cpp
--- a/motordriver.cpp Thu Nov 25 13:34:15 2010 +0000
+++ b/motordriver.cpp Wed Dec 03 07:11:52 2014 +0000
@@ -46,6 +46,10 @@
sign = 0;//i.e nothing.
}
+void Motor::setPwmFreq(float sec) {
+ _pwm.period(sec);
+}
+
float Motor::speed(float speed) {
float temp = 0;
if (sign == 0) {
