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:3aa70ac75ca3
- Child:
- 1:da47ec654063
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Oct 02 14:35:51 2014 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+#include "Motor.h"
+
+Motor motor1(p26,p29,p30);
+
+int main()
+{
+ float motorspeed;
+ for (motorspeed=-1.0;motorspeed<=1.0;motorspeed+=.2)
+ {
+ motor1.speed(motorspeed);
+ printf("Motor speed is %.2f\n",motorspeed);
+ getchar();
+ }
+ motor1.speed(0.0);
+}
\ No newline at end of file