blocks / nano-button-led

Button and LED on a Nano

A button on D2 lights a red LED on D13 of an Arduino Nano, and releasing it turns the LED off.

on Nano (CH340 clone)6 parts1 test

orbe add nano-button-led

Loading the Block

A button on D2 lights a red LED on D13 of an Arduino Nano, and releasing it turns the LED off.

How it works

A 10k pull-down holds D2 low while the button is open, and a 220 ohm resistor sets the LED's current.

Check it with orbe check scene.jsonc and run its tests with orbe test.

Parts in this circuit

License and files(MIT OR Apache-2.0) AND LGPL-2.1-or-later