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:
- 1:f52578243f96
- Parent:
- 0:dde37cabc667
- Child:
- 2:1ae5e25618e0
--- a/main.cpp Sun Nov 15 14:01:48 2020 +0000
+++ b/main.cpp Sun Nov 15 15:19:11 2020 +0000
@@ -25,12 +25,12 @@
/* サーボ */
// MIN MID MAX
-double Servo_1_pulsewidth[3] = {0.001, 0.0015, 0.0020};
-double Servo_2_pulsewidth[3] = {0.001, 0.0015, 0.0020};
-double Servo_3_pulsewidth[3] = {0.001, 0.0015, 0.0020};
-double Servo_4_pulsewidth[3] = {0.001, 0.0015, 0.0020};
-double Servo_5_pulsewidth[3] = {0.001, 0.0015, 0.0020};
-double Servo_6_pulsewidth[3] = {0.001, 0.0015, 0.0020};
+double Servo_1_pulsewidth[3] = {0.0013, 0.0015, 0.0017};
+double Servo_2_pulsewidth[3] = {0.0013, 0.0015, 0.0017};
+double Servo_3_pulsewidth[3] = {0.0013, 0.0015, 0.0017};
+double Servo_4_pulsewidth[3] = {0.0013, 0.0015, 0.0017};
+double Servo_5_pulsewidth[3] = {0.0013, 0.0015, 0.0017};
+double Servo_6_pulsewidth[3] = {0.0013, 0.0015, 0.0017};
Ticker tick_MANUAL;
Timeout timo_MANUAL;
@@ -150,6 +150,8 @@
led[2] =~ led[2];
}
+
+Timer log_loop_timer;
int main()
{
Servo_1.period_ms(20);
@@ -177,12 +179,19 @@
wait(1);
led[0] = 1;
-
+
nucleo_led = 0;
while(1) {
- PM_receive();
+ log_loop_timer.reset();
+ log_loop_timer.start();
+
pc.printf("CM : %02d\n", kModuleID);
+
+ while(log_loop_timer.read() < 0.5f){
+ PM_receive();
+ }
+
nucleo_led =~ nucleo_led;
- wait(0.5);
+ log_loop_timer.stop();
}
}
\ No newline at end of file