Netduino home hardware projects downloads community

Jump to content


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.
Photo

Netduino Plus 2 + Sparkfun GPS Shield + EM-406

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


  • Please log in to reply
2 replies to this topic

#1 r1ch4rd

r1ch4rd

    New Member

  • Members
  • Pip
  • 7 posts
  • LocationIpswich, UK

Posted 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 :mellow:

 

Thanks in advance,

Rich.


  • aredrateliarm , entipttug and ceardorie like this

#2 dino4net

dino4net

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 12 November 2013 - 08:28 AM   Best Answer

Hello,

Did you try com2?

 

I would also use an event handler to see if data is available.

serialport.DataReceived += new SerialDataReceivedEventHandler( .... );


  • r1ch4rd likes this

#3 r1ch4rd

r1ch4rd

    New Member

  • Members
  • Pip
  • 7 posts
  • LocationIpswich, UK

Posted 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 topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.