This is an extremely minimal template for electronics hobbyists. A common task that keeps sending me back to online calculator sites is the selection of resistors to go with LEDs. It’s not hard or anything—just tedious. With this template, which depends on the lovely Numerals plugin, all I have to do is plug in a couple values from the LED’s datasheet and the supply voltage, and out pops a R
, the resistor value in ohms. The whole thing gets dropped into the note where I’m designing the thing with the LED, and done.
```math
supply_voltage = 3.3 V
led_forward_voltage = 2.1 V
led_current = 20 mA
R = (power_supply_voltage - led_forward_voltage) / led_current
Screenshot: