Hi, I just want to make a RBG LED light up with various colors using an IR remote, but as soon as I press a button once, everything else stops working, I need to press the reset button on my arduino UNO to make it work again, here is my code:
Did you put a resistor on the push button as well?
You know that delicate components like the arduino don't like a really high current going trough their I/O pins.
I think everytime you press a button you short the arduino, luckily, the arduino has short circuit protections so you didn't really destroy anything, just put resistors trought the led and the button and it should be fine.
No, it does not. There are separate, strict limitations on the current that can be drawn from any pin, and on the sum of currents to or from all of the pins.
It is safe to draw 20 mA from one I/O pin, on an Arduino Uno, Mega, etc., but much less on some other types of Arduinos.
Without a schematic it's hard to understand how he wired the button,
I tought the button was connected from vcc to the I/O pin, and that "INPUT_PULLUP" was only to ensure that he can't get static signals from air or by touching the circuit.
From what I understand now, he wired the button from the I/O pin to GND, and INPUT_PULLUP is just to have an HIGH signal always read from the pin, and when you push the button it discharges on ground giving a "LOW" signal, it's just an unusual way to wire a simple button.