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.
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?
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
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.
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
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.
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.
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.
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).
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...]
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,
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].
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?
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, 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.
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?