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.

Rhynorater's Content

There have been 1 items by Rhynorater (Search limited from 19-May 23)


By content type

See this member's

Sort by                Order  

#56585 Error when trying to use PWM to regulate motor speed

Posted by Rhynorater on 02 March 2014 - 09:49 PM in General Discussion

Hey guys,

 

I just got a Netduino and so far it is AMAZING! However, I am running into one problem that is really buggin me. When I'm trying to regulate the speed of my motor using a PWM pin, its giving me the following error.

 

An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in SecretLabs.NETMF.Hardware.dll

 

 

Here is the code I'm using:

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 x = new PWM(Pins.GPIO_PIN_D0);
            x.SetDutyCycle(50);
            x.Dispose();
            

        }

    }
}





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.