The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
Hi,
for me as a programmer a strange problem, but today I tried everything with a 9V block battery and now the LED on the GPS receiver is blinking...even inside - but as soon as I plugin the USB cable or only try it using the USB cable no fix is being found...
If it really expects about 9V I would expects some kind of error and not the invalid NMEA results.
Thanks
Hi,
I build the Adafruit Kit with the EM-406A based on this tutorial by Bob Cravens.
Then just ran the code from above (post #5).
But even after walking around about 30 minutes outside with blue sky and no clouds, I still not get a fix.
Does anyone has an idea what the problem could be or how I can debug the possible problem (I'm a programmer not electrician)
Powering on and off the GPS module works fine when switching Pins.GPIO_PIN_D2 from 'false' to 'true' and back. The LED on the GPS receiver gets red(on) or is off(off). I read in other posts, that it will start blinking as soon as it got a fix...but never saw that ;-(
Connection is TX ==> D0; RX ==> D1; PWR ==> D2
As sample output with the program above looks like this.
According to the this reference NMEA sentence info I interpreted my output like this:
Here's some very rough test code I put together to make sure we were getting data from the GPS receiver. You might want to put this in an event handler-based class which parsed the data out and raised events whenever a new location was received.
But this will show you your GPS data stream I've put a 100ms delay in between each iteration of the loop so that we're not getting and printing one byte of data at a time.
I plugged TX, RX, and PWR into pins D0, D1, and D2. This corresponds to serial port 1 (COM1) and a "powerpin" of D2.
using System;using System.IO.Ports;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;namespace GpsLogger{ public class Program { public static void Main() { // write your code here SerialPort serialPort = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One); serialPort.Open(); // pin D2 off = gps module turned on OutputPort powerPin = new OutputPort(Pins.GPIO_PIN_D2, false); while (true) { int bytesToRead = serialPort.BytesToRead; if (bytesToRead > 0) { // get the waiting data byte[] buffer = new byte[bytesToRead]; serialPort.Read(buffer, 0, buffer.Length); // print out our received data Debug.Print(new String(System.Text.Encoding.UTF8.GetChars(buffer))); } Thread.Sleep(100); // wait a bit so we get a few bytes at a time... } } }}
Hi Chris,
May i know what will be the output like?
There's no error but im just wondering how will the output like?
Sorry for my noob question. Im soooo new to this sensor device..
I am a newbie so its probably something I am (or more likely not) doing.
I tried the sample code:
using System;using System.IO.Ports;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;namespace GpsLogger{public class Program{public static void Main(){// write your code hereSerialPort serialPort = new SerialPort("COM1", 4800, Parity.None, 8, StopBits.One);serialPort.Open();// pin D2 off = gps module turned onOutputPort powerPin = new OutputPort(Pins.GPIO_PIN_D2, false);while (true){int bytesToRead = serialPort.BytesToRead;if (bytesToRead > 0){// get the waiting databyte[] buffer = new byte[bytesToRead];serialPort.Read(buffer, 0, buffer.Length);// print out our received dataDebug.Print(new String(System.Text.Encoding.UTF8.GetChars(buffer)));}Thread.Sleep(100); // wait a bit so we get a few bytes at a time...}}}}
which deploys fine and the led flashes on the GPS module but I don't receive any form of result in the VS output window?
I know its not hardware as a friend tested in on his Arduino and it worked ok.