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

Adafruit Ultimate GPS shield


  • Please log in to reply
16 replies to this topic

#1 posixx

posixx

    New Member

  • Members
  • Pip
  • 5 posts

Posted 08 April 2013 - 05:08 PM

Hello Netduino users,

 

I'm trying to get a reading of the following shield: http://learn.adafrui...s-logger-shield

I have soldered all pins and try to read the output but it fails; i get no reading at all. The green LED is on (power is good) and after a minute the red LED goes off indicating a fix. But i cannot get communication setup with my netduino 2. H have soft serial mode enabled. The code i'm using:

 

 // write your code here            SerialPort serialPort = new SerialPort("COM2", 4800, Parity.None, 8, StopBits.One);            serialPort.Open();            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...            }

 

I aready tried COM1 but this is on a different port. According to the docmentation TX and RX signals of the shield are on pin D7 and D8, i'm not sure the netduino can read them as serial data?

 

Hope someone can help.

 

Frans 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 April 2013 - 05:16 PM

Hi Frans, On Netduino 2 and Netduino Plus 2, pins D7/D8 are COM3 RX/TX :) This is a new feature with the gen2 boards. As long as the shield pins are the same way (serial data from shield on D7, serial data to shield on D8) you are probably good to go. Welcome to the Netduino community, Chris

#3 posixx

posixx

    New Member

  • Members
  • Pip
  • 5 posts

Posted 08 April 2013 - 09:12 PM

Hello Chris,

 

Thanks for your welcome:-) I found indeed the COM3 mention on some other tread, but it's not working somehow. I have tried the code from the following post: http://forums.netdui...er/#entry30819, changed it to be "COM3" but it constantly reports 0 bytes accepted, 0 bytes discarded.

 

Any ideas to look for?

 

Frans



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 10 April 2013 - 09:54 PM

Hi Frans, Do you have a logic analyzer? That will show you if there is any data flowing. Also...if you can connect the pins on the shield and the pin headers on the Netduino with them "side by side" (with M-F wires or wires and alligator clips)...you can also see if the RX/TX pins need to be reversed. I would also try just creating a SerialPort for COM3 and check SerialPort.BytesToRead in a loop. Chris

#5 jsalter

jsalter

    New Member

  • Members
  • Pip
  • 1 posts

Posted 24 May 2013 - 03:33 PM

I too have the Netduino Plus 2 and Adafruit Ultimate GPS shield. I managed to get them to work using Chris's wiring suggestion and by amending the Hardware.NmeaGPS sample code from the .Net Micro Framework Toolbox  project (http://netmftoolbox....l/latest#259985):

 

 

<code>

..
public static NmeaGps Gps = new NmeaGps(SerialPort: "COM3", BaudRate: 9600);

..

</code>

 

 

Like I say, just wire Netduino pin D8 to pin D7 on the GPS shield.

And Netduino pin D7 to pin D8 on the GPS shield. You may also need to check what baud rate you have sent on the GPS shield (I think the default is 9600).

 

I'm currently running v4.2.2 of the firmware and v4.3 of the SDK.

 

I've attached a couple of patched files from the Toolbox project that might help.

Attached Files



#6 perezca

perezca

    New Member

  • Members
  • Pip
  • 1 posts

Posted 14 June 2013 - 05:10 AM

HI jsalter and Chris,

Thank you for all  your support. I am trying to get this code up and running with Netduino Go. How would you use the same code in a Netduino Go device. I am trying to get up the speed with the Go model, any hints will be appreciated.



#7 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 03:21 PM

I am trying to assemble a Adafruit Ultimate GPS Shield and a Netduino. Dose any one have a connection diagram for this setup. I will appreciate your input.

 

Thank you,

 

Gustavo 



#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 May 2015 - 03:59 PM

Hi perezca,

HI jsalter and Chris,
Thank you for all  your support. I am trying to get this code up and running with Netduino Go. How would you use the same code in a Netduino Go device. I am trying to get up the speed with the Go model, any hints will be appreciated.

Great question. Instead of "COM3" for the serialport name, use shieldBase.SerialPorts.COM#. That should be all you need to do :)

One note: GPS is known to take quite a bit of power, depending on receiver. If you have a lot plugged into your Netduino Go + Shield Base, you may need to give the GPS a dedicate power supply (i.e. if USB power isn't quite enough at that point).

Chris

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 May 2015 - 04:00 PM

Hi Gustavo,

I am trying to assemble a Adafruit Ultimate GPS Shield and a Netduino. Dose any one have a connection diagram for this setup. I will appreciate your input.

Are you looking for a diagram of how to assemble the shield, or a diagram of how to plug it into your Netduino? [Generally, shields can only be inserted into Netduino in one direction...]

Chris

#10 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 07:06 PM

Hi Chris,
Thanks for your prompt response. I bought an Adafruit Ultimate GPS Logger Shield and a Netduino. I am looking for a diagram of how to plug/connect the shield to the Netduino.
Thank you,

Gustavo

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 May 2015 - 07:23 PM

Hi Gustavo,

Thanks for your prompt response. I bought an Adafruit Ultimate GPS Logger Shield and a Netduino. I am looking for a diagram of how to plug/connect the shield to the Netduino.


Which Netduino do you have? If it's a gen2 or gen3 board, you should just physically "plug it in" :) It only fits one way [and there is a different size of space between the headers on each side...and a different number of header pin holes on each side].

Chris

#12 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 07:25 PM

Chris,

 

This is my understanding of the connection:

Netduino         Connect to       GPS Shield

Digital I/O                                   Shield Breakout

Pin DO ---------------------------   TX

Pin D1  ---------------------------   RX

Pin O2  ---------------------------  Power (what pin on the shield will this be?)

The code show supplying power to the GPS through Pin O2. Does this mean that Netduino will supply power through a Digital I/o pin? Also, if this is correct, what will be the pin in the shield to connect to?

 

Thank you,



#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 May 2015 - 07:26 PM

Hi gvecino,

Can you include a photo of the shield with your post? There is no "pin O2" on the Arduino/Netduino pinout...so that may be a pin where you can supply an external power supply to the shield.

Chris

#14 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 07:30 PM

Hi Chris,
I just bought it two days ago.
Adafruit Ultimate GPS Logger Shield - Includes GPS Module[ID:1272]
thank you,

Gustavo

#15 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 07:36 PM

Chris,

Attached is the GPS Shield Pic

Attached File  x1272-00_jpg_pagespeed_ic_4G3Xc51V4v.jpg   172.06KB   4 downloads

#16 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 May 2015 - 08:05 PM

Chris,
Thanks for your responses and help.
Sorry, my mistake is not O2 I meant D2 or Pin 2
I am using Bob Cravens Tutorial and following the bellow instructions:

TX (Digital I/O Pin 0) This is the transmit pin, data that comes from the GPS module with location data.
RX (Digital I/O Pin 1) This is the receive pin, data that goes to the GPS module to configure it.
PWR (Digital I/O Pin 2) This pin is connected to a transistor that controls power to the GPS. When this pin is set to LOW the GPS module turns on and when the pin is set to HIGH the GPS turns off.

Should I assemble the Shield over the Netduino and make all the existing pin connections between the Shield and Netduino, or have them side-by-side and only make these three connections.

#17 gvecino

gvecino

    Member

  • Members
  • PipPip
  • 10 posts

Posted 26 May 2015 - 06:08 PM

Hi Netduino Community,

I got to assemble the Adafruit GPS shield to my Netduino Plus 2, and got to print the gps output to the debugger. I am using serial port (COM1) to capture NMEA sentence that VS 2013 prints out on its debugger interface.

How I did it? I assembled the GPS shield on top of the Netduino with all the pins. I solder a pin to Pin 0 and TX on top of the GPS shield and connected these two pins. I ran the code suggested by Bob Cravens Tutorial and was able to print the GPS sentence to the Debugger.

My idea is to be able to capture the NMEA sentence on my computer so I can use the information to code other functionalities. Though, I am having difficulties getting Netduino to send the NMEA sentence to my computer using a COM port, so I can capture it using desktop code or a hyperterminal interface.In my computer Device Manager Netduino appears as using an USB port but not as a COM port. Is this the reason way the hyperterminal dose not capture the NMEA sentence?

Dose anyone know how to solve this issue?

Thanks Gustavo




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.