updating switches, capacitors, and LEDs