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