I've always had a problem understanding resistors. Perhaps I just need to see an example, but until then, I'm completely stuck.
Say I have 3.3v of power with 40mA of current, and I want to power an LED that requires 2v and 20mA to run. What sort of resistor would I use to make sure I don't blow it out?
I know I can calculate the resistance of the two using Ohm's law, but is that what I'm supposed to do? Where do I go from there?
For these kinds of things the thing you need is called ‘Ohms law’ and every roboteer should know it. its a very simple forumla that describe how volts and amps and resistance relate to eachother.
its the basis for like 90% of all math in electronics.
See the video tutorials at http://thenewboston.org/list.php?cat=41, videos 6 through 10 should be relevant to your question. There is also a lot of programming video tutorials on this website!