I purchased a Power Driver Shield kit from SparkFun http://www.sparkfun.com/products/10305 but could use some help in actually using it.
What I am ultimatly trying to do is control an RGB LED strip (see my previous post on the subject "help driving LED strip lighting" http://forums.netdui...-strip-lighting )
Being a noobie I havent a clue what to do next.
Thanks!
help with SparkFun power driver shield
Started by two schnauzers, Mar 10 2011 05:22 PM
1 reply to this topic
#1
Posted 10 March 2011 - 05:22 PM
#2
Posted 10 March 2011 - 05:47 PM
I purchased a Power Driver Shield kit from SparkFun http://www.sparkfun.com/products/10305 but could use some help in actually using it.
What I am ultimatly trying to do is control an RGB LED strip (see my previous post on the subject "help driving LED strip lighting" http://forums.netdui...-strip-lighting )
Being a noobie I havent a clue what to do next.
Thanks!
Mount the power driver shield to your netduino board, and write some code, those are the next steps
Seriously though, you need to create an OutputPort to set the state of the appropriate pins. Something like this:
OutputPort p11 = new OutputPort(Pins.GPIO_PIN_D11, false); while(true) { p11.Write(true); System.Threading.Thread.Sleep(1000); p11.Write(false); System.Threading.Thread.Sleep(1000); }
This code will toggle the state of Pin 11, turning power on and off to the outer right screw terminal (labeled D11).
You can get more fancy and use PWM (Pulse Width Modulation) to set a "brightness" of the LEDs. Search the forums for PWM for more details.
-dan
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users