Files
diodeinc__pcb/examples/LEDCircuit/LEDCircuit.zen
Akhil Velagapudi b3d193e07d Fix stdlib style warnings (#738)
* Fix stdlib style warnings

* Fix formatting, lints

* Update snapshot
2026-04-17 15:20:01 -04:00

19 lines
545 B
Python

"""
A simple LED circuit with current limiting resistor.
This demonstrates using standard components to create a basic LED driver.
"""
Resistor = Module("@stdlib/generics/Resistor.zen")
Led = Module("@stdlib/generics/Led.zen")
r_value = config(str, default="330ohms", optional=True)
led_color = config(str, default="red", optional=True)
VCC = io(Power)
GND = io(Ground)
led_anode = Net("LED_ANODE")
Resistor(name="R1", value=r_value, package="0603", P1=VCC, P2=led_anode)
Led(name="D1", color=led_color, package="0603", A=led_anode, K=GND)