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: RemoteIR TextLCD
Revision 48:09a8f23a3807, committed 2020-08-31
- Comitter:
- molberry
- Date:
- Mon Aug 31 06:51:32 2020 +0000
- Parent:
- 47:8a5a4275480a
- Commit message:
- wifi end;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Aug 24 02:04:01 2020 +0000
+++ b/main.cpp Mon Aug 31 06:51:32 2020 +0000
@@ -255,29 +255,29 @@
switch(run){
/* 前進 */
case ADVANCE:
- motorR1 = motorSpeed[flag_sp]; // 右前進モーターON
- motorR2 = LOW; // 右後退モーターOFF
- motorL1 = motorSpeed[flag_sp]; // 左前進モーターON
- motorL2 = LOW; // 左後退モーターOFF
- break;
- /* 右折 */
- case RIGHT:
motorR1 = LOW; // 右前進モーターOFF
motorR2 = motorSpeed[flag_sp]; // 右後退モーターON
motorL1 = motorSpeed[flag_sp]; // 左前進モーターON
motorL2 = LOW; // 左後退モーターOFF
break;
+ /* 右折 */
+ case RIGHT:
+ motorR1 = motorSpeed[flag_sp]; // 右前進モーターON
+ motorR2 = LOW; // 右後退モーターOFF
+ motorL1 = motorSpeed[flag_sp]; // 左前進モーターON
+ motorL2 = LOW; // 左後退モーターOFF
+ break;
/* 左折 */
case LEFT:
- motorR1 = motorSpeed[flag_sp]; // 右前進モーターON
- motorR2 = LOW; // 右後退モーターOFF
+ motorR1 = LOW; // 右前進モーターOFF
+ motorR2 = motorSpeed[flag_sp]; // 右後退モーターON
motorL1 = LOW; // 左前進モーターOFF
motorL2 = motorSpeed[flag_sp]; // 左後退モーターON
break;
/* 後退 */
case BACK:
- motorR1 = LOW; // 右前進モーターOFF
- motorR2 = motorSpeed[flag_sp]; // 右後退モーターON
+ motorR1 = motorSpeed[flag_sp]; // 右前進モーターON
+ motorR2 = LOW; // 右後退モーターOFF
motorL1 = LOW; // 左前進モーターOFF
motorL2 = motorSpeed[flag_sp]; // 左後退モーターON
break;
@@ -755,7 +755,7 @@
strcpy(webbuff, "<!DOCTYPE html>");
strcat(webbuff, "<html><head><title>RobotCar</title><meta name='viewport' content='width=device-width'/>");
- strcat(webbuff, "<meta http-equiv=\"refresh\" content=\"5\"; >");
+ //strcat(webbuff, "<meta http-equiv=\"refresh\" content=\"5\"; >");
strcat(webbuff, "<style type=\"text/css\">.noselect{ width:100px;height:60px;}.light{ width:100px;height:60px;background-color:#00ff66;}.load{ width: 50px; height: 30px;font-size:10px}</style>");
strcat(webbuff, "</head><body><center><p><strong>Robot Car Remote Controller");
strcat(webbuff, "</strong></p><td style='vertical-align:top;'><strong>Battery level ");