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: mbed
Diff: main.cpp
- Revision:
- 8:765a73e21907
- Parent:
- 7:fae874e898b3
- Child:
- 9:435ce4946f6c
--- a/main.cpp Wed Dec 04 11:49:44 2019 +0000
+++ b/main.cpp Fri Dec 06 08:35:28 2019 +0000
@@ -64,9 +64,9 @@
{
a = gps.latitude;
b = gps.longitude;
-
+ pc.printf("位置情報取得成功!\r\n");
pc.printf("(%lf,%lf)\r\n",gps.latitude,gps.longitude);//緯度と経度を表示
-
+
break;
}else{
@@ -74,8 +74,15 @@
wait(1);
}
}
+
while(1)
- {
+ { printf("移動距離測定開始\r\n");
+ left1=100;
+ right1=100;
+ wait(5);
+ left1=0;
+ right1=0;
+ wait(3);
if(gps.getgps()) {
pc.printf("(%lf,%lf)\n\r",gps.latitude,gps.longitude);//緯度と経度を表示
@@ -104,12 +111,8 @@
if (distance<5){
- printf("%lf\r\n",distance);
- right1=100;
- left1=100;
+ printf("走行距離=%lf\r\n",distance);
}else{
- right1=0;
- left1=0;
pc.printf("5m clear!");
break;
}