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

My Netduino project : a boat computer with GPS


  • Please log in to reply
7 replies to this topic

#1 terb

terb

    Member

  • Members
  • PipPip
  • 22 posts

Posted 16 September 2012 - 08:58 PM

Hi there ! for my second post, I would like to present you my actual project : a boat computer with a Netduino & GPS. The functions I want are : - take positions data from the GPS and calculate the real speed of the boat (unlike meters that takes the speed information from the water pressure) - show this speed in km/h or knots with a button allowing to switch from km/h to knots - show the orientation : "N S E W" (north south est west) like a compass (calculated from the last known GPS position) - show the engine time, basically it's a clock that starts to 0:00 when the boat computer is powered on - as the speed is the important information, I would like to show it in bigger letters (need custom character set) - [not really needed : it would be cool if a second button could switch the dislay to a screen showing the current GPS coordinates in full numbers] all this will be showed through a LCD 16x2 screen. I already bought a shield for this, this DF Robot one : http://www.dfrobot.c...51#.UFY66EbLzDs I saw a post in the forum saying this shield works with our Netduinos. This shield has a little keypad but I don't need it ; maybe the 1 or 2 buttons I talked about, but I could use different I/O ports for that. I didn't decided which GPS system to use. my brave ship is a vintage 11ft outboard sport/ski boat. I don't really need another informations on such a small boat and I like the fact that a 16x2 display will be easy to integrate elegantly on a vintage boat. I'd love to start coding the engine time clock and the display methods but my Netduino is doing some kind of strike and I have to solve this problem first (http://forums.netdui...fuses-to-reset/). I will show you the results when it's done and when doing it. thanks for your interest !

#2 Christopher Clark

Christopher Clark

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationNorth Carolina, USA

Posted 16 September 2012 - 10:05 PM

Hi

I had similar problem, where I could not deploy code to the Netduino or ping the device.

Why does it happen? I read posts saying that say sometimes it's the code loaded to the board, leaves in in a bad state when restarting, where restart can't complete. I have since found that sometimes the code doesn't change, but it just happens when deploying. So my current belief is that "it just happens"

Anyways, here is what I did to fix it, so now it's a non issue and I can fix it when it happens.

I have the Netduino Go, but I think the process would be similar for all, although the steps might be different.

1. Erase your board
2. Reflash the 4.2.0.0 firmware to the device

Here is what I do for the NetDuino Go

1. I disconnect the board from my computer's USB port
2. I press and hold the reset button on the board, while I connect the USB to my computer
3. I use DFUSE's app to erase my board. You can find a link for DFUSE application here, and the specific step I was missing which caused it not to erase here in reply #4.
4. I reflash my Netduino as described here

Netduino Firmware 4.2.0.0 links

NetDuino
http://forums.netdui...-firmware-v420/

NetDuino Plus
http://forums.netdui...-firmware-v420/

NetDunio Go
http://forums.netdui...-firmware-v420/

#3 terb

terb

    Member

  • Members
  • PipPip
  • 22 posts

Posted 17 September 2012 - 07:59 AM

Hi Christopher, thank you very much, I will try this today !

#4 terb

terb

    Member

  • Members
  • PipPip
  • 22 posts

Posted 17 September 2012 - 09:06 AM

Hi again ! I just tried tu upload a very simple program on the Netduino and it works. One strange thing (or not ?) is that I have to push the button after uploading the program to get it running.

the code :
static OutputPort led = new OutputPort(Pins.ONBOARD_LED, false);
        
public static void Main()
{
   while (true)
   {
      led.Write(true);
      Thread.Sleep(400);
      led.Write(false);
      Thread.Sleep(400);
      led.Write(true);
   }
}


#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 17 September 2012 - 10:08 AM

Hi terb,

Hi again ! I just tried tu upload a very simple program on the Netduino and it works. One strange thing (or not ?) is that I have to push the button after uploading the program to get it running.


If you plug in the board (i.e. not right after deployment), does the app start up automatically? If so, then the Visual Studio debugger may just be having troubles reconnecting to the device after it reboots. This happens sometimes, and pressing the reset button can often resync things.

Chris

#6 terb

terb

    Member

  • Members
  • PipPip
  • 22 posts

Posted 17 September 2012 - 11:47 AM

Hi Chris, yes you're right, when plugging the board again the program starts. perfect :) thanks !!

#7 terb

terb

    Member

  • Members
  • PipPip
  • 22 posts

Posted 17 September 2012 - 06:38 PM

I upgraded to the 4.2 firmware and everything seems to work way better now. Visual Studio crashes very often but that's not a big issue. I just made the LCD screen work, using the Hd44780Lcd class (http://netmftoolbox.codeplex.com/) ; I tried the MicroLiquidCrystal lib but it seems to have some issues with the 4.2 firmware/framework and it's way heavier than the Hd44780Lcd class. I highly recommand using the Hd44780Lcd class : lightweight, easy to use and functionnal. Great start for my little project :) thank you all for your help !

#8 clod

clod

    New Member

  • Members
  • Pip
  • 1 posts
  • LocationNSW Australia

Posted 15 November 2012 - 11:00 AM

Hi Terb, Sounds like a similar project that I am working on. I have a plus and SparkFun GPS shield retail kit. I have got this stuff to work before using an external GPS but I want to get a higher sample rate and still leave the RS232 comms for other stuff like depth, hull speed, wind speed and direction. Have you used any base classes with this, I will be cracking on with VB as a preference. Andrew




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.