Is there a known problem with the Electron and reading serial?
I’m using a really basic sketch to read off of a GPS device. I simplified it to a test to probe that there are problems on the Electron. I’m running this sketch on a Photon (it works) and the Electron (and it fails as seen). It looks almost like there are missing characters.
Output from Electron (running 0.4.8):
35N166,G11,,*V034,,7,,1,7,
45,,75
,4314L8.0A$GPRMC,023506.00,A,4531.97180,N,12241.94173,W,1.271
T,KP0.23.M,S,0,8
43,,03
260790$,,,802G14,5
Output from Photon (running 0.4.9):
$GPGSV,4,3,15,24,58,259,26,25,07,295,,28,15,105,26,32,05,330,*7F
$GPGSV,4,4,15,46,34,146,,48,37,194,,51,35,159,*40
$GPGLL,4531.96822,N,12241.94001,W,022932.00,A,A*7F
And here’s the code:
void setup()
{
Serial.begin(115200);
Serial1.begin(9600);
delay(1000*5);
}
void loop()
{
if (Serial1.available() ) {
char c = Serial1.read();
if (c == 10 || c == 13) {
Serial.println();
} else {
Serial.write(c);
}
}
}