Kit 5 - Motors and Power Control
Project 18: Relay Lamp Timer (Intermediate)

A press switches the relay (and the green lamp on its contacts) on for 6 s. Pressing again while it is on restarts the countdown.

Parts:
  Push Button tactile 6x6 x1
  Relay Module 1 Channel 5V x1
  Resistor 220 ohm 1/4W x1
  LED 5mm Green x1

Circuit notes:
  Relay module: DC+ 5V, DC- GND, IN <- D8 (active LOW: LOW = relay on)
  Push button between D2 and GND (INPUT_PULLUP, pressed = LOW)

Try it first in the simulator: https://jrlearners.com/arduinoforge/?example=k5-18-relay-timer
