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

Blinkin' LED code not working


Best Answer Gutworks , 18 January 2013 - 05:02 PM

Thanks for the test Dave! Just a point of clarification the new assembly file for the NP2 is actually named Netduino.dll :)

 

James, a thought just came to mind. In addition to upgrading your firmware, have you installed the new SDK? If not, then I highly suggest you do, otherwise you will need to manually replace the old Netduino.dll with the new one. 

 

The SDK can be found on the Netduino downloads page.

 

Steve

Go to the full post


  • Please log in to reply
6 replies to this topic

#1 James

James

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts

Posted 18 January 2013 - 04:05 PM

I updated my Netduino Plus 2 to the latest 4.2.2 firmware and tried the following code to flash the LED:

 

 

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

 

When I start debugging the blue LED at the top right comes on for a few seconds, so I'm sure it's working, but will not flash as I expected. Stranger still, if I press the button on the board the LED does light up, and Windows makes a "USB device attached" sound. Seems like a simple enough test, any idea what I'm doing wrong?

 

Thanks,

James



#2 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 18 January 2013 - 04:31 PM

Curious.

 

I'm not near my NP2 at the moment, however I'm pretty sure the ONBOARD_LED can be accessed as Chris has used it in one of his previous examples. Your example is straightforward and I don't see any reason why it shouldn't work as expected. The behaviour of the LED you mention is actually what happens when the board first powers up and doesn't sound like it's a part of the actual application you are deploying. Also when you press the button you are in fact resetting the Netduino and therefore starting the boot process again. 

 

I wonder if your app is actually getting deployed or not. Can you try updating  the deployment transport in "Project Properties > .NET Micro Framework. Then change the device from "USB" to "Serial" and back to "USB" again. Failing that, I would create a new Visual Studio project using the Netduino Plus 2 template and try pasting your code there. 

 

Cheers,

Steve



#3 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 18 January 2013 - 04:52 PM

I just upgraded a ND+2 and ran this code. Works 100%.  You may want to try to redeploy again.  Be sure you are using the new 4.2.2.0 NetduinoPlus DLL



#4 Gutworks

Gutworks

    Advanced Member

  • Members
  • PipPipPip
  • 363 posts
  • LocationOttawa, Ontario

Posted 18 January 2013 - 05:02 PM   Best Answer

Thanks for the test Dave! Just a point of clarification the new assembly file for the NP2 is actually named Netduino.dll :)

 

James, a thought just came to mind. In addition to upgrading your firmware, have you installed the new SDK? If not, then I highly suggest you do, otherwise you will need to manually replace the old Netduino.dll with the new one. 

 

The SDK can be found on the Netduino downloads page.

 

Steve


  • James likes this

#5 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 18 January 2013 - 05:09 PM

Thanks for the test Dave! Just a point of clarification the new assembly file for the NP2 is actually named Netduino.dll :)

 

James, a thought just came to mind. In addition to upgrading your firmware, have you installed the new SDK? If not, then I highly suggest you do, otherwise you will need to manually replace the old Netduino.dll with the new one. 

 

The SDK can be found on the Netduino downloads page.

 

Steve

 

Actually on my machine after installing the 4.2.2.0 SDK there is no 4.2.2.0 SecretLabs.NETMF.Hardware.Netduino.  This still shows as 4.2.1.0.  The SecretLabs.NETMF.Hardware.NetduinoPlus DLL shows as version 4.2.2.0.  I believe Chris said the Plus DLL works for both the ND+ and ND+2.  Did I mis-read that?



#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 18 January 2013 - 06:20 PM

Actually on my machine after installing the 4.2.2.0 SDK there is no 4.2.2.0 SecretLabs.NETMF.Hardware.Netduino.  This still shows as 4.2.1.0.  The SecretLabs.NETMF.Hardware.NetduinoPlus DLL shows as version 4.2.2.0.  I believe Chris said the Plus DLL works for both the ND+ and ND+2.  Did I mis-read that?
The SecretLabs.NETMF.Hardware.Netduino.dll didn't change with 4.2.2--so its version remains at 4.1.0.
The SecretLabs.NETMF.Hardware.NetduinoPlus DLL shows as version 4.2.2.0. I believe Chris said the Plus DLL works for both the ND+ and ND+2. Did I mis-read that?
Yes, that's correct. It probably also works on Netduino 2 and Netduino Go as well; we've done a lot to simplify NETMF for you in the background. Chris

#7 James

James

    Advanced Member

  • Members
  • PipPipPip
  • 56 posts

Posted 21 January 2013 - 01:20 AM

Looks like my DLL versions were off, upgrading to the Netduino SDK 4.2.2 fixed the issue.  Thanks!!






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.