Hi Frode, Before .NET MF 4.2, there was no built-in PWM class in NETMF. So we made one. For backwards-compatibility, we still provide that older class as an add-on (in SecretLabs.NETMF.Hardware.PWM.dll). But most users will want to use the newer PWM class, found in Microsoft.SPOT.Hardware.PWM. Does that get you up and running? Chris Go to the full post
Did the PWM class change?
Posted 14 October 2013 - 07:53 PM
I'm working on a class for driving a servomotor with PWM, and I'm searching around for examples on how to use PWM.
In all the forumthreads and blogposts I find about PWM on the Netduino they refer to a signature that looks like this:
new PWM(PWMChannels, Int32, Float, Bool)
But the PWM class I find in SecretLabs.NETMF.Hardware.PWM.dll has a signature that looks like:
I'm using 4.2 .NET MF, firmware 184.108.40.206 and version 220.127.116.11 of the PWM dll.
Has the PWM class been changed, or am I doing something weird?
Posted 14 October 2013 - 10:11 PM Best Answer
Posted 15 October 2013 - 05:45 AM
Aha, that was the missing piece. I removed my reference to the old SecretLabs.NETMF.Hardware.PWM.dll, and added a new reference to Microsoft.SPOT.Harware.PWM, and now I see the new PWM class.
Thank you Chris
Posted 15 October 2013 - 02:37 PM
When using the old SL, my pwm was at GPIO_PIN_D5 (on chip, pin 65, name PB8/Tim4_Ch3)
How may I reference it using the microsoft.spot.hardware.pwm ?
var led = new Microsoft.SPOT.Hardware.PWM( __PIN_NAME__ , 1000, 500, false);
Posted 15 October 2013 - 03:56 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users