A resistor is an electronic component that limits or controls the flow of electric current in a circuit.
Resistors are important because too much current can damage components like LEDs, sensors, or microcontrollers. By adding resistance, the current is reduced to a safe level.
Resistors are measured in ohms (Ω). The higher the resistance value, the less current flows through the circuit.
Most resistors have colored bands on them. These color bands represent the resistance value. For example, red-red-brown means 220 ohms.
Resistors are used for many purposes:
Protecting LEDs
Dividing voltage
Controlling signal levels
Adjusting brightness
Without resistors, many electronic circuits would not work safely.
In summary, a resistor controls how much current flows in a circuit, protecting other components from damage.