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:
- 10:b190babac114
- Parent:
- 9:ec770f68440e
- Child:
- 11:8061348a85eb
--- a/main.cpp Sun Dec 08 13:38:35 2019 +0000 +++ b/main.cpp Mon Dec 09 10:43:47 2019 +0000 @@ -58,12 +58,13 @@ int k = 0; int j = 0; - pc.printf("GPS Start\r\n"); - xbee.printf("s\n"); - if(gps.getgps()){ + pc.printf("GPS Start\n"); + xbee.printf("s\n"); + while(1) { + if(gps.getgps()){ pc.printf("(%lf,%lf)\r\n",gps.latitude,gps.longitude);//緯度と経度を表示 - i ++; + k ++; if(k<59){ }else{ a = gps.latitude; @@ -77,13 +78,13 @@ } } printf("moter on"); - left = 100; //左モーター100% - right = 100;//右モーター100% + left1 = 100; //左モーター100% + right1 = 100;//右モーター100% wait(30); printf("moter off"); - left = 0; //左モーター10% - right = 0;//右モーター10%(左折) + left1 = 0; //左モーター0% + right1 = 0;//右モーター0% printf("moter off"); wait(15); printf("GPS restart\n"); @@ -126,8 +127,8 @@ } }else{ printf("No data"); - } - } //GPS End + } + } //GPS End int i=1; float th;