blocks / nano-led-fade

LED fade on a Nano

An LED on D9 of an Arduino Nano fades up and down by PWM.

on Nano (CH340 clone)4 parts1 test

orbe add nano-led-fade

Loading the Block

An LED on D9 of an Arduino Nano fades up and down by PWM.

How it works

The sketch steps analogWrite on D9 from 0 to 255 and back by 5 every 30 ms, so the LED fades up and down about every 3 seconds. 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