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

PWM inputs and RGB LEDs


  • Please log in to reply
1 reply to this topic

#1 monewwq1

monewwq1

    Advanced Member

  • Members
  • PipPipPip
  • 104 posts

Posted 11 July 2011 - 12:34 AM

I am trying to determine how to get accurate color representation of RGB values with a Netduino's PWM inputs. Specifically, I had worked with an Arduino and the range of the PWM inputs was 0 to 255. On the Netduino, the range is 0 to 100. I want to be able to generate colors based on a scale of 0 to 255 for red, green, and blue. I was able to do this easily with the Arduino. You can see my video of RGB LED color generation with an Arduino. I am unsure how to do this with Netduino. I know that there is a SetPulse and SetDutyCycle function, but I can't seem to figure out how to get a range of 0 to 255 so that I can represent monitor RGB LED values. Any help is greatly appreciated.

#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 11 July 2011 - 06:35 AM

I am trying to determine how to get accurate color representation of RGB values with a Netduino's PWM inputs. Specifically, I had worked with an Arduino and the range of the PWM inputs was 0 to 255. On the Netduino, the range is 0 to 100. I want to be able to generate colors based on a scale of 0 to 255 for red, green, and blue. I was able to do this easily with the Arduino. You can see my video of RGB LED color generation with an Arduino here: http://www.nickfesse...ex.php?post=18. I am unsure how to do this with Netduino. I know that there is a SetPulse and SetDutyCycle function, but I can't seem to figure out how to get a range of 0 to 255 so that I can represent monitor RGB LED values. Any help is greatly appreciated.

Firstly, welcome to the community.

There is a forum posting on PWM here. I found this useful when I played around with this earlier in the year.

Pete Brown has also written a post onthe subject and that can be found on his blog.

Hope this helps,
Mark

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter





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.