- meet my supervisor to show the progress of the project
- get the GPS data and data logger in a proptiary senteces
- try to used lcd display (to display the latitude and longitude)
purpose:
-to get a final result of the project
method:
- do the configuration of GPS data logger
- try to find the I2C (lcd display capable with Arduino) configuration for display latitude and longitude of the point.
the sample configuration of GPS data logger:
#include <SD.h>
const int chipSelect = 10;
void setup()
{
Serial.begin(9600);
pinMode(10, OUTPUT);
if (!SD.begin(chipSelect)) {
return;
}
}
void loop()
{
// make a string for assembling the data to log:
char index = 0;
char temp = 0;
String dataString = "";
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
/*
while(Serial.available())
{
File dataFile = SD.open("datalog.txt", FILE_WRITE);
if(dataFile)
{
temp = Serial.read();
dataString += String(temp);
dataFile.print(dataString);
dataString = "";
dataFile.close();
}
}
*/
File dataFile = SD.open("datalog.txt", FILE_WRITE);
if(dataFile)
{
while(Serial.available())
{
temp = Serial.read();
dataString += String(temp);
index++;
if(index>200)
break;
}
dataFile.print(dataString);
dataFile.close();
}
}
reference:
- Arduino forum
- Books
- Arduino expertise
No comments:
Post a Comment