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

Controlling a LED Intensity


  • Please log in to reply
13 replies to this topic

#1 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 18 September 2010 - 12:18 PM

Digital IO is only On/Off. So, do I have to use Analog Output, or PWM to control the intensity of a LED? I'm assuming it would be the same concept as controlling a Piezoelectric Buzzer, which would be PWM.
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#2 klotz

klotz

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 18 September 2010 - 01:03 PM

Use a PWM. You can then control the brightness by changing the duty cycle (duration). I would reference the articles in this forum but you can't search for PWM or LED because of the search rules :angry:

#3 Ravenheart

Ravenheart

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationBulgaria

Posted 18 September 2010 - 03:35 PM

PWM is best yes, you CAN do it with a DigitalIO and loop and Thread.Sleep() :rolleyes: but thats wasteful and its easier with PWM

#4 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 18 September 2010 - 06:05 PM

Yep, PWM is the way to go. @Raven: Fancy seeing you here :rolleyes:

#5 Ravenheart

Ravenheart

    Member

  • Members
  • PipPip
  • 18 posts
  • LocationBulgaria

Posted 18 September 2010 - 07:36 PM

NegativeOne Chris?

#6 Paul

Paul

    Member

  • Members
  • PipPip
  • 14 posts

Posted 18 September 2010 - 07:58 PM

Use a PWM. You can then control the brightness by changing the duty cycle (duration). I would reference the articles in this forum but you can't search for PWM or LED because of the search rules :angry:

The way to get around the "at least four character" search constraint in the forums is to use Google to do the search. I remember reading the LED brightness posting you mentioned. I went to Google and entered "netduino pwm" as my search. The first few hits were in the Netduino Forums and the second one was exactly the posting you referred to.

Paul

#7 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 18 September 2010 - 08:28 PM

NegativeOne Chris?

Hahah, not here. But yeah, I'm Chris on TinyCLR.

#8 greg

greg

    Advanced Member

  • Members
  • PipPipPip
  • 169 posts
  • LocationChicago, IL

Posted 18 September 2010 - 09:04 PM

Hahah, not here. But yeah, I'm Chris on TinyCLR.


Lots of CLR folks hang out here too ;-)

#9 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 19 September 2010 - 12:32 AM

Thanks guys... I think that may be my next project to tackle... I want to do a Knight Rider/Cylon display (a fun project to learn with).
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#10 Beijer

Beijer

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationSweden

Posted 19 September 2010 - 02:26 PM

Here is the link to be nice to you guys ;) http://forums.netdui.../103-pwmsample/

#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 19 September 2010 - 03:53 PM

Thanks, Beijer. And welcome to the Netduino community!

#12 Eric Burdo

Eric Burdo

    Advanced Member

  • Members
  • PipPipPip
  • 130 posts

Posted 19 September 2010 - 05:37 PM

Here is the link to be nice to you guys ;)
http://forums.netdui.../103-pwmsample/


Thanks... I'll give that a shot.

And I really think I need to buy another netduino... I have one in the middle of a project, and it would be handy to have a second one. :)
~ Eric D. Burdo ~ http://brick-labs.com/

Today LED's, tomorrow, the world!!! Well, OK, maybe servos.

#13 dab

dab

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts
  • LocationBellevue, WA, USA

Posted 22 September 2010 - 05:27 AM

And if you have any questions about the PwmSample, please feel free to post them here or in the Project Showcase forum (I posted the sample code). Let us know when you get the Cylon / Knight Rider circuit working (and share the code if you don't mind). ;)
Thanks,
~ David ~

#14 Beijer

Beijer

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationSweden

Posted 22 September 2010 - 04:09 PM

Thanks, Beijer. And welcome to the Netduino community!


Hehe, thanks.

Just ordered a netduino a couple of days ago and waiting patiently.
I'm thinking of starting with electronics so I have got me a multimeter, soldering station and breadboard etc. I have a long journey ahead of me. :D

Any tips on a first project?
I'm complete beginner at electronics but I have good knowledge about C# and the .net framework.


Sorry if I hijacked the thread a bit.




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.