This question already has an answer here:
- Why is a resistor needed for LEDs? 2 answers
Can someone explain why LED lights need resistors when connecting to pi. The raspberry Pi is either providing 3.3v or 5v depending on if it's connected to power pins or gpio pins. Your set up would depend on the LED(Cathode or Anode). If the LED supports up to 5 volts why do u need a resistor? Previously I hooked up an Ultrasonic Senor. The pi's general gpio pins only support 3.3v. Therefore needed to hook a resistor from senors trig pin to pi general gpio(input). This is because the Ultrasonic Senor needs 5v to operate. If I am sending a 3.3v signal from pi to LED light then why does it need a resistor before goes to ground?