Go Down

Topic: Arduino BT with Parallax GPS module (Read 955 times) previous topic - next topic


May 09, 2009, 11:32 am Last Edit: May 09, 2009, 11:52 am by blank Reason: 1
Im using the ArduinoBT with the Parallax GPS module.

I'm powering the board with just one 1.5V battery at the moment.
I wrote a small program to test if I can read the NMEA strings. The program checks if I can get the first character of the NMEA string ( first character = $). The GreenLed (pin 13) will turn on when the first character of the string is $, otherwise the RedLed(pin 12) is on.

The code is below:

Code: [Select]

#include <ctype.h>
#include <string.h>

int ledPinRed = 12;            //Led-On = if I dont get the $ char
int ledPinGreen = 13;         //Led-On = If I get the $
int rxPin = 0;                    //Serial Communication Pin Rx (Receive)
int txPin = 1;                    //Serial Communication Pin Tx (Transmit)
char buffer;                  
int incomingByte=-1;        
char check='$';                 //The first Valid Char of  a NMEA string

void setup()

void loop()
digitalWrite(ledPinRed, HIGH);
digitalWrite(ledPinGreen, LOW);
if (incomingByte == -1){
 if(incomingByte == check){
   digitalWrite(ledPinRed, LOW);
   digitalWrite(ledPinGreen, HIGH);

Im new at this and I have a few questions:

First of all, is my code ok?

Do you think the 1.5V supply is the reason my gps module doesnt seem to work? The "low-battery" led on the board is always on.

Should I use the NewSoftSerial Library for the communication?

I wonder if the board can get serial data, in my code with the SerialRead function.



I cannot judge the quality of your code.
The board certainly communicates over the serial port.
Use the getting started Guide http://arduino.cc/en/Guide/ArduinoBT and you will be up and running over serial communication in no time.

Regarding the power, unless you haven't done so, pls refer to http://arduino.cc/en/Main/ArduinoBoardBluetooth.
To me 1.2V seems a bit low, add some juice as the GPS module needs some of it too. Maybe use a battery pack with 2-3 batteries providing 3V or 4.5V.

Good luck, Hans.


Hi Blank,

I was wondering if you ever got this working? I am trying the same thing now. Thanks.



You should use the Serial.available function to determine if there is data to read, before calling the read function.

You can also use Serial.print (and Serial.println) to print data to the Serial Monitor window, when the Arduino is connected to the computer, so that you can see all the data being read.
The art of getting good answers lies in asking good questions.

Go Up