News:

SMF - Just Installed!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - peejster

#1
So, then this is the correct pin layout?

static const int GPS_RXPin = A1;
static const int GPS_TXPin = A0;
#2
Unable to get a reading from the GPS TinyShield. I've read the documentation for the GPS TinyShield as well as the notes from the TinyGPSPlus library. I have the TinyDuino board at the bottom, then the GPS TinyShield on top of the processor, and then the TinyShield USB & ICP board on top of the GPS.

I ran the Blink sketch successfully to ensure that everything was working properly. (From the IDE, the board I have selected is Arduino Pro or Pro Mini (3.3V, 8MHz) with ATmega328.)

To test the GPS, I used the setup from the example provided in the Tiny-Circuits site and then I used a simplified loop just to get some readings. However, I always seem to get the "No GPS detected" message. I also wasn't sure exactly which pin A0 or A1 is the RX pin on the GPS TinyShield - the example code has RX as A1 but the text above th example code on the Tiny-Circuits GPS tutorial states that RX is A0. I tried it both ways - same result.

I can't figure out why I am not getting any readings.

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/*
   This sample code demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
*/
static const int GPS_ONOFFPin = A3;
static const int GPS_SYSONPin = A2;
static const int GPS_RXPin = A0;
static const int GPS_TXPin = A1;
static const int GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(GPS_RXPin, GPS_TXPin);

void setup()
{
  Serial.begin(115200);
 
  // Init the GPS Module to wake mode
  pinMode(GPS_SYSONPin, INPUT);
  pinMode(GPS_ONOFFPin, OUTPUT);
  digitalWrite( GPS_ONOFFPin, LOW );   
  delay(5);
  if( digitalRead( GPS_SYSONPin ) == LOW )
  {
    // Need to wake the module
    digitalWrite( GPS_ONOFFPin, HIGH );
    delay(5);
    digitalWrite( GPS_ONOFFPin, LOW );     
  }

  ss.begin(GPSBaud);
}

void loop()
{
  while (ss.available())
    if (gps.encode(ss.read()))
    {
      Serial.print(F("Location: "));
      Serial.print(gps.location.lat(), 6);
      Serial.print(F(","));
      Serial.print(gps.location.lng(), 6);
    }
   
  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }
}