#include <SD.h>
const int chipSelect = 10;
void setup()
{
Serial.begin(4800);
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();
}
}
but in monitor i only see empty space so i dono does it read or what =( is someting relating to tx & rx connection ?!
as in second code i change them to 3&4 !!
Cause juging the lenght of the data it return, it's pretty shure you have a lock and the gps send you data. Mayby 4800 is still to fast. try 2400, then 1200. or maybe to port is not reading fast enogh then try 14400. But for sure, it's a speed matching problem.
after tying the second code with 2400 its work but same issue starts !!!
just Chars !! have number and after some 10 or 5 min its give some number in Checksum fail !!
GPS_from_Dexter_Industries_Example_Code:61: error: invalid conversion from 'int' to 'const uint8_t*'
GPS_from_Dexter_Industries_Example_Code:61: error: initializing argument 1 of 'virtual size_t Print::write(const uint8_t*, size_t)'
Frederic_Plante:
Ok no forget about that code, for sure it's not the same kind of gps any way. I wanted you to try cause it look like it's using a similar pin out.
hmmm ok just wait 20min and i will back to take pic and upload it
as i woke up from 5am and from 12pm works on just the gps =( and now 10:41pm i need small shower to refresh my body lol
Cause I'm not totally sure that your Interrupt jumper are necessary first, and also I'm pretty sure that they are supposed to go the other way, well like vertically instead of horizontally.
Then why don't you use real jumper instead of Dupont cables, it must drive you mad?
finaly at bottom left, near the analog input, what are those jumper for?