Best Answer dino4net, 12 November 2013 - 08:28 AM
Hello,
Did you try com2?
I would also use an event handler to see if data is available.
serialport.DataReceived += new SerialDataReceivedEventHandler( .... );
Go to the full post  | |||||||||||||||||||||||||||
Netduino Plus 2 + Sparkfun GPS Shield + EM-406
Started by r1ch4rd, Nov 06 2013 08:06 PM
Netduino Plus 2 sparkfun gps em 406
Best Answer dino4net, 12 November 2013 - 08:28 AM
Hello, Did you try com2?
I would also use an event handler to see if data is available. serialport.DataReceived += new SerialDataReceivedEventHandler( .... ); Go to the full post
2 replies to this topic
#1Posted 06 November 2013 - 08:06 PM HI Guys,
Has anyone had any luck with Netduino Plus 2, Sparkfun GPS Shield (https://www.sparkfun.../products/10710) & EM-406? 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.
Any pointers would be very muchly appreciated! Fantastic forum btw
Thanks in advance, Rich.
#3Posted 28 December 2013 - 01:48 PM Hi Guys,
Thanks dino4net for the response!
I finally got around to having another look at using: EM 406, Sparkfun GPS board and Netduino Plus 2.
Whilst I am now receiving NMEA statements from the GPS device no location data is being returned - just a time and date stamp.
I don't think the EM406 will lock when connected to the Netduino plus as I left it for an hour and only got the static red led which indicates no lock. I tested it again with an Arduino and it locked (flashing red led) within 1 minute so its not a faulty receiver..
Would be interested to find out how people are getting around this?
Many thanks, Rich. Also tagged with one or more of these keywords: Netduino Plus 2, sparkfun gps, em 406
0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | |||||||||||||||||||||||||||