tinsangbeeping/my_led_testing
This code defines a React component that creates an electronic module with an 8-pin microcontroller (like ATMEGA328P) connected to an external 2-pin header, including an internal signal path with a resistor and LED for visual indication, plus optional decoupling capacitor.
- Version
- 0.0.1
- License
- unset
- Stars
- 0
MainCircuit.tsx
PCB
Schematic
import React from "react"
import MCUInterface from "./MCUInterface"
import LedSeriesBlock from "./LedSeriesBlock"
export default function MainCircuit() {
return (
<board width="50mm" height="50mm">
{/* MCU with explicit pin names */}
<MCUInterface name="MCU" schX={0} schY={0} />
{/* LED + resistor block */}
<LedSeriesBlock name="LEDCHAIN" schX={20} schY={0} resistorValue="330" />
{/* Connections now work exactly as written */}
<trace from=".MCU > .pin1" to=".LEDCHAIN > .SIGNAL" />
<trace from=".MCU > .pin2" to=".LEDCHAIN > .GND" />
</board>
)
}