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

Hardware Classes For Netduino


  • Please log in to reply
11 replies to this topic

#1 Vinh

Vinh

    New Member

  • Members
  • Pip
  • 7 posts

Posted 25 October 2011 - 04:17 PM

It seems easy so far running the first program to blink the led but the fun stops here. To go further I think I need the listing and description of the classes in "using..." Microsoft.SPOT.Hardware SecretLabs.NETMF.Hardware.Netduino and what not. I am new and need help to go forward. I hope not asking the wrong question, please show me where to find. Thank you. Vinh

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 26 October 2011 - 01:07 AM

Hi Vinh, I know this is an answer to a different question, but have you looked at the Projects page and also the Project Showcase forum? There are a lot of example projects which use the various classes in .NET MF...along with excellent additions like the netmftoolbox. Chris

#3 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 26 October 2011 - 03:22 AM

To go further I think I need the listing and description of the classes in "using..."


Hey, Vinh,

First, let me recommend the book Getting Started with the Internet of Things by Cuno Pfister. Check out this site's Download page for sample chapters. This book is perfect for learning about the power of NetduinoPlus (it requires Plus for networking).

Second, our very own Chris Walker is publishing a book any day now...

Hey, Chris. Wasn't your book due out 3 days ago?

...called Getting Started with Netduino. THAT should be another good resource.

Finally, I agree. There seems to be an API or users manually missing. .NETMF provides most of the documentation, but Netduino is a scaled DOWN version of .NETMF. (Which is serious, since .NETMF is already a miracle of miniaturization - it has "micro" in its name for a reason. Perhaps Netduino has created the .NET Nano Framework or Pico Framework?) Regardless, there should be comprehensive documentation on the differences between .NETMF and Netduino's "Port" of .NETMF because the differences are significant. Maybe the community will provide this before Secret Labs does. :)

Welcome to the forum.

#4 Dan T

Dan T

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationBoston (Greater)

Posted 26 October 2011 - 03:31 AM

Both Amazon and O'Reilly have Chris' book arriving in January. :o

#5 Vinh

Vinh

    New Member

  • Members
  • Pip
  • 7 posts

Posted 27 October 2011 - 03:45 AM

Hi Thanks for the suggestion of the book but I only have a simple Netduino board. I think the book Chris will publish would reveal what I need. I found the Microsoft.SPOT.Hardware classes here: http://msdn.microsof...y/cc532289.aspx ______________________________________________________________________ I managed to find the PWM and wrote a simple program: using System; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; using SecretLabs.NETMF.Hardware.Netduino; namespace NetduinoApplication1 { public class Program { public static void Main() { PWM Pulse1 = new PWM(Pins.GPIO_PIN_D6); OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); while (true) { for (uint i = 0; i < 100; i++) // this make a led on pin D6 increase intensity periodically { Pulse1.SetPulse(100000,i); //Is this 100000 ms or micro second? //Thread.Sleep(20); } led.Write(true); // turn on the LED Thread.Sleep(1); // sleep for 10ms led.Write(false); // turn off the LED //Thread.Sleep(1000); // sleep for 1000ms } } } } The program lid the led at pin D6 OK but then when I ran debug to line "PWM Pulse1 = new PWM(Pins.GPIO_PIN_D6);" it says the file 'C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs' does not exist. Is it normal that I don't have a folder C:\Documents\Secret Labs\ ?

#6 Vinh

Vinh

    New Member

  • Members
  • Pip
  • 7 posts

Posted 29 October 2011 - 01:07 PM

I start with Texas Instrument MSP430 Launchpad (cheap) and found lots of support there. I will come back to work with Netduino next year when the community grows bigger and hopefully will find adequate support then.

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 29 October 2011 - 04:43 PM

Hi Vinh, What version of the Netduino firmware are you running on your board? Which Netduino (Netduino, Netduino Plus, or Netduino Mini)? Chris

#8 Johan

Johan

    Member

  • Members
  • PipPip
  • 10 posts

Posted 01 November 2011 - 12:11 PM

In lots of examples on this forum you see only the code snippets. And sometimes you can see whats defined in the "Using ..." section. But mostly I have to screw around with the references. This is because I'm a complete NEWB :) I saw an example where somebody put the references in the code between /* */ blocks. Maybe only NEWBs have this problem, but it helps allot :D

#9 Vinh

Vinh

    New Member

  • Members
  • Pip
  • 7 posts

Posted 03 November 2011 - 01:45 PM

Hi Vinh,

What version of the Netduino firmware are you running on your board? Which Netduino (Netduino, Netduino Plus, or Netduino Mini)?

Chris


Hi Chris

I am using simple NETDUINO. Below is firmware info.

ClrInfo.clrVersion: 4.1.2821.0
ClrInfo.clrVendorInfo: Netduino by Secret Labs LLC
ClrInfo.targetFrameworkVersion: 4.1.2821.0
SolutionReleaseInfo.solutionVersion: 4.1.0.6
SolutionReleaseInfo.solutionVendorInfo: Netduino by Secret Labs LLC
SoftwareVersion.BuildDate: Feb 14 2011
SoftwareVersion.CompilerVersion: 400902

Regards

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 03 November 2011 - 03:02 PM

Hi Vinh, For some odd reason, Visual Studio seems to be wanting to debug into the source code. If you want to create that folder and drop the source (from the downloads page) into it, or ask Visual Studio to ignore its request to debug...you should be good to go. Were you trying to step into the behind-the-scenes managed code? Chris

#11 Vinh

Vinh

    New Member

  • Members
  • Pip
  • 7 posts

Posted 04 November 2011 - 02:03 AM

Hi Vinh,

For some odd reason, Visual Studio seems to be wanting to debug into the source code. If you want to create that folder and drop the source (from the downloads page) into it, or ask Visual Studio to ignore its request to debug...you should be good to go.

Were you trying to step into the behind-the-scenes managed code?

Chris


Hi Chris
I am not that knowledgeable to step into the behind-the-scenes managed code.

I copy the source files into that directory and I have this response:

Locating source for 'C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs'. Checksum: MD5 {5d 7 45 ef 1c c7 cd 32 65 20 c a0 5 7c 1a 6b}
The file 'C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs' exists.
Looking in script documents for 'C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs'...
Determining whether the checksum matches for the following locations:
1: C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs Checksum: MD5 {55 b6 55 e 46 5 5d 41 11 69 56 40 2f e8 7 16} Checksum doesn't match.
Looking in the projects for 'C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs'.
The file was not found in a project.
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\vc7\atlmfc'...
Looking in directory 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\vc7\crt'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs.
The debugger could not locate the source file 'C:\Documents\Secret Labs\Projects\Production\SecretLabs.NETMF.Hardware\PWM.cs'.

Vinh

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 November 2011 - 02:17 AM

Hi Vinh, Is this stopping your program from running...or just giving you a warning? Does this only happen if you single-step through your code? Chris




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.