Loading...
Pages: [1]   Go Down
Author Topic: Arduino1.0 and SoftwareSerial Library Example  (Read 749 times)
0 Members and 1 Guest are viewing this topic.
Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Tesla Member
***
Karma: 73
Posts: 6638
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you try SoftwareSerial on 22 - that way you can tell if the difference is library-related or Arduino software version related...
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 8
Posts: 3532
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the NewSoftSerial  .cpp and .h adjusted to 1.0 and could compiled the NewSoftSerial Test program.
This program get absolutely the same results as with SoftwareSerial Library Example.
I loose by the characters $ GPGLL sentence?
The problem must therefore be at Arduino 1.0 . I hope this was helpful to find the error.
Best regards Willy
Logged

Brooklyn, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

looks like a baud rate problem. is it consistent?
the buffer is 64 bytes, you are receiving 150+.
What do you get when you buffer the overflow flag?
Logged

Pages: [1]   Go Up
Print
 
Jump to: