I'm sure you get a lot of these posts, but even after searching around I'm not really confident in my conclusions enough that I can part without some sort of confirmation from more experienced people.
I'm new to electronics in general and Arduino in particular. So I've been reading and following tutorials but I still can't understand some things about resistors. The points in which I need help are in bold for easy identification.
Let's say I have a Red LED with forward current and voltage: 2V, 20mA
Assuming I connect it to a 5V pin in the Arduino, I should use a resistor of about 150 Ohms for that LED, correct? Reasoning: R = V/I = 5 - 2 / 20ma = 150 Ohms
If I don't have a resistor with 150 Ohms, would I be safe using any resistor with more Ohms than that (provided the LED still shines)?
(I don't understand why the "Getting Started with Arduino" guide tells us to connect an LED directly to one of the pins, but I'll assume it's just a quick test)
If I use an RGB LED (let's simplify and assume each color has the same specs as above), should I use 3 150 Ohms resistors, one in each input?
Now another thing that I find strange is that switch products like Pushbuttons and DIP Switches do not generally have a datasheet (just physical dimensions), and I thought they wouldn't need any resistors because they just stop or connect the circuit. Imagine my surprise when the tutorial told me to use a 10k Resistor.
So if I understand correctly, we need to use a big resistor like that to make sure the voltage is fixed on a determined state (depending on where we put the resistor). However, in my first tests I connected an output pin on HIGH to a pushbutton switch (without any resistor), connected to an LED (with the resistor I'm using for the LEDs) and it worked. Does this break the buttons? Why exactly do I need the resistor?
Thank you so much for your time and I'm sorry if these questions are answered time and time again. All I could find were tidbits of information and since I'm not fond of burning equipment I thought I'd ask for confirmation of my findings.