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: MODSERIAL QEI mbed
Diff: main.cpp
- Revision:
- 4:60bc2ee4d838
- Parent:
- 3:b913f8ea69e8
- Child:
- 5:a1376ab695f3
--- a/main.cpp Wed Oct 07 17:33:57 2015 +0000
+++ b/main.cpp Wed Oct 07 17:46:01 2015 +0000
@@ -17,13 +17,12 @@
float cycle = 0.6;//define the speed of the motor
bool motor1_on = 1;
int motor1_dir=0;
- int motor1_cw=0;
- int motor1_ccw=1;
while(1){
led3.write(0);
led1.write(1);
led2.write(1);
+ speed1.write(0);
pc.baud(115200);
while(button1.read() != motor1_on){// turn on motor 1 when the button is being pressed