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: SDFileSystem mbed
Fork of mbed_GPS_TP by
Revision 1:ac509e6b8e61, committed 2017-09-11
- Comitter:
- Joeatsumi
- Date:
- Mon Sep 11 01:02:14 2017 +0000
- Parent:
- 0:7fe771d8b39a
- Commit message:
- ?????????????????????
Changed in this revision
diff -r 7fe771d8b39a -r ac509e6b8e61 SDFileSystem.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SDFileSystem.lib Mon Sep 11 01:02:14 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/mbed_official/code/SDFileSystem/#8db0d3b02cec
diff -r 7fe771d8b39a -r ac509e6b8e61 main.cpp --- a/main.cpp Sun Sep 03 11:54:59 2017 +0000 +++ b/main.cpp Mon Sep 11 01:02:14 2017 +0000 @@ -1,12 +1,16 @@ //LPC1768での作動を確認。 #include "mbed.h" +#include "SDFileSystem.h" + DigitalOut led(LED1); -LocalFileSystem local("local"); +//LocalFileSystem local("local"); +SDFileSystem sd(p5, p6, p7, p8, "sd"); //機体に搭載する際には、LPC1768ではなく、LPC1114を使うと思うので、 //LocalFileSystem ではなく、sdfilesystemを使うといいかも。 Serial gps(p9,p10);//9,10ピンをGPSの送受信に用いる。 +Serial pc(USBTX,USBRX); int main(){ @@ -23,6 +27,7 @@ rcv[count]=gps.getc(); + if(rcv[count]=='$'){//$という文字を受信したら、 rcv[0]='$'; count=1; @@ -30,13 +35,14 @@ if(rcv[count-1]=='\r'&&rcv[count]=='\n'){ rcv[count+1]='\0'; - if(memcmp(rcv, "$GPRMC",6) == 0) {//$GPRMCという文字を10回取得すると記録する。 + if(memcmp(rcv, "$GPRMC",6) == 0) {//$GPRMCという文字を1回取得すると記録する。 - if(log_count >= 10) { + if(log_count >= 1) { log_count=0; - led=1; - fp=fopen("/local/nmea.log","a"); + led=1; + mkdir("/sd/mydir", 0777); + fp=fopen("/sd/mydir/nmea.log","a"); if(fp != NULL){ fprintf(fp,"%s",rcv); fclose(fp);
diff -r 7fe771d8b39a -r ac509e6b8e61 mbed.bld --- a/mbed.bld Sun Sep 03 11:54:59 2017 +0000 +++ b/mbed.bld Mon Sep 11 01:02:14 2017 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/mbed/builds/fd96258d940d \ No newline at end of file +https://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90 \ No newline at end of file