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.

Leon

Member Since 19 Mar 2013
Offline Last Active Private
-----

Topics I've Started

How to generate a PWM signal with C#?

27 March 2013 - 11:16 AM

I input the following code in C#  in order to generate a PWM signal in netduino D6 PIN ,but failed after  visual studio display:

1. 'Microsoft.SPOT.Hardware.PWM' does not contain a constructor that takes 1 arguments...

2.''Microsoft.SPOT.Hardware.PWM' does not contain a definition for 'Setdutycycle' and no extension method 'Setdutycycle' accepting a first argument  of type 'Microsoft.spot.hardware.PWM' could be found .

 

Is there somebody can help me? gratitude!

{   public class Program   {   public static void Main()   {   PWM PWM_R = new PWM(Pins.GPIO_PIN_D6);   int value = 0;   while (true)   {   value += 1;   if(value>=100) value = 0;   PWM_R.SetDutyCycle(value);   Thread.Sleep(20);   }     }   } }  


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.