How would you test a second hand Netduino? - Beta Firmware and Drivers - Netduino Forums
   
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

How would you test a second hand Netduino?


Best Answer Gutworks, 22 January 2013 - 08:09 PM

Keen eye Paul. In Chris book "Getting Started with Netduino," at the end of chapter 3, he mentions this difference in the firmware. The note in the book states:

 

 

"The Netduino’s pushbutton uses a special wiring configuration to enable it to act as both a reset button and a digital input. It also technically sends a low voltage when pushed even though your code will see a value of true. These values are reversed for the pushbutton inside the Netduino firmware; they are logical values instead of physical values.Early versions of the Netduino firmware did not reverse the physical values. If your Netduino’s LED exhibits the reverse behavior when you run this sample, you can either update your firmware or change the code..."

 

This change seems to have been for the InputPort, so it would also affect the behaviour in your example. 

 

Cheers,

Steve

Go to the full post


  • Please log in to reply
3 replies to this topic

#1 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 22 January 2013 - 07:48 PM

Evening all.

 

With all this talk about new Netduino v2s, I decided to find out how much they cost in the UK.

Anyway to cut a long story short I ended up buying a pair of Netduino Plus v1 revBs for £27 off ebay.

Quite a good deal I felt, and since they are the same as my current plus, I would not have to worry about different SDKs and firmware etc.

 

Well they arrived a day later and I was a little concerned they were not shipped in any sort of anti-static packaging. So it dawned on me that I need to test them and see if all is OK.

 

I wrote the following (actually most of it was auto generated) to read the onboard switch and set the LED to match. Only updating once a second so I could tell that it was the software setting the LED and not a short circuit:

using System;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.NetduinoPlus;namespace LedAndButtonTest{    public class Program    {        public static void Main()        {            // write your code here            var switchPort = new InputPort(Pins.ONBOARD_SW1, false, Port.ResistorMode.Disabled);            var ledPort = new OutputPort(Pins.ONBOARD_LED, false);            while (true)            {                ledPort.Write(switchPort.Read());                Thread.Sleep(1000);            }        }    }}

Well they both turn the LED on and off, but I was presented with a mystery: they behaved differently.

One turns the LED ON when the button is pressed, and the other turns it OFF when the button is pressed.

 

I tested the same program on my original Netduino plus v1 revB, that exhibited the latter behaviour - wrong in my book.

 

Well after playing with MfDeploy.exe, it turns out that one of my second hand Netduinos has a different version of firmware.

Mine:  Netduino Plus by Secret Labs LLC - Feb 14 2011

Other: Netduino Plus (v4.1.1.0 b1 with extra RAM) by Secret La - Apr 10 2011

 

Now I think I am going to have to update the firmware after all! :(

 

(Yes I know that my testing so far is very limited, I really need to loop back lots of the digital pins to check those, and try out lots of pots on the analogue inputs. But this was a quick "GO" = "NO GO" test whilst sitting in front of the fire.)

 

Have fun - Paul



#2 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 22 January 2013 - 08:07 PM

id test the adc ports first, than pwm, than the digital i/o ..

 

if thats working, i2c and such will work too iam sure

 

 

i would be most worried of some guy damaged the adc



#3 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 22 January 2013 - 08:09 PM   Best Answer

Keen eye Paul. In Chris book "Getting Started with Netduino," at the end of chapter 3, he mentions this difference in the firmware. The note in the book states:

 

 

"The Netduino’s pushbutton uses a special wiring configuration to enable it to act as both a reset button and a digital input. It also technically sends a low voltage when pushed even though your code will see a value of true. These values are reversed for the pushbutton inside the Netduino firmware; they are logical values instead of physical values.Early versions of the Netduino firmware did not reverse the physical values. If your Netduino’s LED exhibits the reverse behavior when you run this sample, you can either update your firmware or change the code..."

 

This change seems to have been for the InputPort, so it would also affect the behaviour in your example. 

 

Cheers,

Steve



#4 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 22 January 2013 - 09:29 PM

Keen eye Paul. In Chris book "Getting Started with Netduino," at the end of chapter 3, he mentions this difference in the firmware. The note in the book states:

 

 

 

This change seems to have been for the InputPort, so it would also affect the behaviour in your example. 

 

Cheers,

Steve

Thanks Steve,

 

I have the internet of things book - don't have the other one.

(That was a subtle hint Chris - does not have to be autographed. :P )

 

So far I have avoided upgrading firmware as there often seem to be side effects reported on the forums.

Better the devil you know!

 

Have fun - Paul






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.