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.

r1ch4rd

Member Since 09 Aug 2011
Offline Last Active Jan 17 2014 03:26 PM
-----

#53851 Netduino Plus 2 + Sparkfun GPS Shield + EM-406

Posted by r1ch4rd on 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.




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.