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

Learn from my fail...


  • Please log in to reply
6 replies to this topic

#1 Gorf

Gorf

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 05 April 2012 - 03:02 PM

It's like an episode of "Dumb and Dumber" I'm connecting my ND+ to the ethernet port on a solar power inverter for record keeping. The inverter switches off at night, and previously this caused the ND+ to hang permanently after a few attempts to connect. The program now goes into a reboot loop until it can successfully connect, at the moment set to 10 seconds but it will be 5 minutes when we go live. Of course, when I wanted to try some other software I'd written, I took it away from the inverter. When I plugged the ND+ in and tried to deploy, it failed because the inverter software started running, and the first thing it did was reboot because it couldn't see the inverter. I'm sure there must be an easy way to power up the ND+ without running the embedded program, but I couldn't find it. In the end, I did a hard reset and reloaded the firmware etc. Got everything back to a normal state, loaded up Visual Studio and my project and hit F5. approx 1 nanosecond later, I realise I was deploying the inverter check routines again, instead of the LEDblink routine I usually use to make sure it's all working again... Muppet.

#2 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 05 April 2012 - 03:07 PM

Doh I keep doing something equally silly at the mo, where I start ripping my code apart trying to work out why i cant read from a SPI device, generally im about 15 mins into the "debugging/desperately trying anything" when i realise that i have disconnected the power loom from the breadboard....

#3 Christoc

Christoc

    Advanced Member

  • Members
  • PipPipPip
  • 127 posts
  • LocationBallwin, MO

Posted 05 April 2012 - 04:41 PM

Heh been there done that

View my blog at ChrisHammond.com

Projects: Netduino Tank/Tracked Vehicle, DNNFoos, Random other bits


#4 ErikN

ErikN

    Advanced Member

  • Members
  • PipPipPip
  • 119 posts
  • LocationNew York, NY

Posted 05 April 2012 - 06:46 PM

Heh been there done that


You failed to mention whether you acquired the t-shirt.

#5 Roy Salisbury

Roy Salisbury

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 05 April 2012 - 08:40 PM

Might be one of the times when you need to develope a "failsafe" startup routine. Like, check to see if pins X and Y are shorted before running your main loop. If they are shorted, just exit. Should only be a few lines of code to include at the top of every application. Would this work? Roy

#6 Gorf

Gorf

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 05 April 2012 - 09:15 PM

Yep - that sort of thing would work. I just put a 30sec wait at the start, seems to be long enough when deploying a new version...

#7 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 06 April 2012 - 04:00 AM

I'm sure there must be an easy way to power up the ND+ without running the embedded program, but I couldn't find it. In the end, I did a hard reset and reloaded the firmware etc. Got everything back to a normal state, loaded up Visual Studio and my project and hit F5.


Personaly for things that have tight loops, I like to add a resistor from +3.3 to an Analog pin, if the pin isn't high then I continue with the program, otherwise Thread.Sleep. That way when I want to debug I just add the resistor and I'm set.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 





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.