Clearly introduced, thank you. Would have been (maybe) useful to tell about the default values in case of blink, etc. Otherwise it's difficult to guess why the led is blinking at that rate :)
You typically add a resistor to a circuit with an LED to limit the current flowing through the LED. LEDs have a specific forward voltage drop, and if the voltage source exceeds this value, without a resistor, it can draw too much current and potentially burn out. The resistor helps regulate the current to protect the LED and ensure it operates within its specified parameters. The value of the resistor is chosen based on the LED's forward voltage and the supply voltage.
from gpiozero import LED from signal import pause red = LED(17) red.blink() pause() ======= from gpiozero import LED from time import sleep led = LED(17) while True: led.on() sleep(0.5) led.off() sleep(0.5) ===========