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: ikarashiMDC mbed
Fork of ikarashiMDCmaster by
Diff: main.cpp
- Revision:
- 3:d806e2426788
- Parent:
- 1:f63faad28bb1
--- a/main.cpp	Tue Aug 22 01:55:25 2017 +0000
+++ b/main.cpp	Mon Aug 28 09:21:53 2017 +0000
@@ -4,22 +4,25 @@
 DigitalOut serialcontrol(D2);
 
 ikarashiMDC ikarashi[]{
+    ikarashiMDC(&serialcontrol,2,0,SM,&serial),
+    ikarashiMDC(&serialcontrol,2,1,SM,&serial),
     ikarashiMDC(&serialcontrol,2,2,SM,&serial),
-    ikarashiMDC(&serialcontrol,2,3,LAP,&serial),
+    ikarashiMDC(&serialcontrol,2,3,SM,&serial)
 };
 PwmOut pwm(LED1);
 
 int main() {
-    serial.baud(115200);
+    serial.baud(38400);
     float i = -1,j = -1;
     while(1) {
         ikarashi[0].setSpeed(i);
         ikarashi[1].setSpeed(i);
+        ikarashi[2].setSpeed(i);
+        ikarashi[3].setSpeed(i);
         i += 0.01;
-        j += 0.02;
         pwm = fabs(i);
-        wait_ms(20);
         if(i >= 1) i = -1;
         if(j >= 1) j = -1;
+        wait_ms(20);
     }
 }
    