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

What is the purpose of SecretLabs.NETMF.Hardware.PWM?

pwm MF4.3 Netduino Plus 2

  • Please log in to reply
2 replies to this topic

#1 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 04 June 2014 - 06:22 PM

Having just purchased a Netduino Plus 2 and ported some existing code from my Plus 1 that uses PWM, I was initially stumped by why it wouldn't work. I went down a blind alley using SecretLabs.NETMF.Hardware.PWM, thinking that perhaps I needed to use that instead. In the end though, I discovered that I just had to call PWM.Start(), which wasn't necessary before. What gave me the tip-off was looking in the source code, I noticed it was calling PWM.Start() internally, so in that sense the class was useful, but I can't really see a reason for it to exist since it seems to be a poor relation to the equivalent in Microsoft.SPOT.Hardware.Pwm.

 

So what is this class for? Is this some sort of legacy class, or am I missing something?

Best regards,

Tim Long



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 June 2014 - 09:58 PM

Hi Tim,

Great question. The SecretLabs PWM classes existed before NETMF had integrated PWM classes. We provide them as optional add-ons for backwards compatibility with older code.

Chris

#3 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 05 June 2014 - 12:15 PM

Ah, that makes perfect sense, thank you Chris.

 

I wonder, would it be worth applying the [Obsolete] attribute to this class as a signpost to use the newer classes in .net MF?

 

Best regards,

Tim







Also tagged with one or more of these keywords: pwm, MF4.3, Netduino Plus 2

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.