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

Member Since 02 Mar 2014
Offline Last Active Mar 25 2014 09:30 PM
-----

Topics I've Started

Error when trying to use PWM to regulate motor speed

02 March 2014 - 09:49 PM

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.