Go Down

Topic: Arduino1.0 and SoftwareSerial Library Example (Read 1 time) previous topic - next topic

Willy

Hi,
with the Arduino 22 and NewSoftSerial Test from Mikal Hart.
I received from GPS Receiver the following information:
Goodnight moon!
$GPZDA,152444.00,14,12,2011,,*60
$GPGLL,4730.3739,N,00924.9473,E,152444.00,A,A*63
$GPZDA,152446.00,14,12,2011,,*62
$GPGLL,4730.3739,N,00924.9473,E,152446.00,A,A*61

with the new Arduino1.0 and SoftwareSerial Library Example
I lose characters by the $GPGLL sentence ???
Goodnight moon!
$GPZDA,152656.00,14,12,2011,,*61                           
$GPGLL,4730.3737,N,00924.9468,E,152656.00A$GPZDA,152658.00,14,12,2011,,*6F
$GPGLL,4730.3737,N,00924.9467,E,152658.00*$GPZDA,152700.00,14,12,2011,,*63
                                                                ¦ missing comma , A,A 63 and "CR" "LF"             
Can someone help my ? I receive all 2 second first the $GPZDA after the $GPGLL sentence.               
Willy

MarkT

Can you try SoftwareSerial on 22 - that way you can tell if the difference is library-related or Arduino software version related...
[ I won't respond to messages, use the forum please ]

Willy

I 've  found on 22 -  the library "SoftwareSerial"  but not a Example program
My testprogram I could not compile
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,0);
void setup() 
{
  Serial.begin(57600);
  Serial.println("Goodnight moon!");
  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
}

void loop()    // run over and over again
{
    if (mySerial.available())
{
     Serial.print((char)mySerial.read());
  }
}

Compiler Error 'class SoftwareSerial' has not nember named 'available'

Best regards Willy

mellis

Weird, the SoftwareSerial library in Arduino 1.0 is the NewSoftSerial.  Can you post the whole program?

What if you install the NewSoftSerial library into Arduino 1.0, and try that?

Willy

The in the NewSoftSerial ibrary contained NewSoftSerialTest program  isn't compatible with Arduino 1.0.  I cannot compile it.
With this SoftwareSerial Library Example program in Arduino 1.0
I lose characters by the $GPGLL sentence ???

#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,0);
void setup() 
{
  Serial.begin(57600);
  Serial.println("Goodnight moon!");
  // set the data rate for the SoftwareSerial port
  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
}
Best  regards Willy

Go Up