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.

SirFatty

Member Since 02 Feb 2013
Offline Last Active Dec 14 2013 03:01 PM
-----

Topics I've Started

RGB LED Color Cycle

15 February 2013 - 09:53 PM

Hi,

 

Complete beginner here.. I've completed the RGB LED project as shown in the "Getting Started with Netduino" and thought I would attempt to dive into the software side a bit.  I've attempted a start with this, but encountered many problems.  Here's the code bit from the book:

 

 

            PWM redled = new PWM(Pins.GPIO_PIN_D9);
            PWM greenled = new PWM(Pins.GPIO_PIN_D6);
            PWM blueled = new PWM(Pins.GPIO_PIN_D5);
 
            //change the color intensities
            //since I was using a common anode, the opposite duty cycle is required
 
            redled.SetDutyCycle(50);  //60% red intensity      
            greenled.SetDutyCycle(50); //0% greem intensity
            blueled.SetDutyCycle(50); //100% blue intesity
 
            //go to sleep
            Thread.Sleep(Timeout.Infinite);
 
So to begin with, I want to just change the redled duty cycle, 0-100-0 in a loop.  I thought I would do something like this:
 
for (int 1= 0; 1 < 100; i++) 
 
then insert that into the redled statement:
 
redled.SetDutyCycle(i);  //60% red intensity
 
And then loop it somehow.... but C# is yelling at me, and I have no idea what I'm doing... so just a little nudge would be great.  Not looking for the answer, but a direction would be awesome.
 
Thanks in advance!
 

 

 


Netduino and C#

13 February 2013 - 02:30 PM

Hi all,

 

I recently received my Ultimate Netduino kit from Make, and began my C# video lessons over at Channel 9 on MSDN. Sorry if my question is nonsensical to the veterans here, but I'm still trying to get my head wrapped around this whole thing.

 

I have a question about the available commands(?) in the netduino environment.  I've searched the forum, but cannot seem to find a list.  I've seem comments stated that I should look at sample code, which is ok, but not necessarily comprehensive.

 

I have the "Getting Started with Netduino", which I was hoping would have that information, but doesn't.

 

 

Thanks!


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.