ShiboSoftwareDev/pushbutton-led-tutorial
A compact USB-C powered push-button board with a single red LED, featuring a current-limiting resistor for basic interaction and signaling.
Usage: To import and use the "@tsci/ShiboSoftwareDev.pushbutton-led-tutorial" package: 1. Import the package in your tscircuit project: ```tsx import PushButtonLedTutorial from "@tsci/ShiboSoftwareDev.pushbutton-led-tutorial" ``` 2. Use the component in a board or circuit layout: ```tsx export default () => ( <board> <PushButtonLedTutorial /> </board> ) ``` The component includes a USB-C connector, push button, LED, and a resistor, pre-configured with basic connections and positioning.
- Version
- 0.0.1
- License
- unset
- Stars
- 6
dist/pcb.svg
PCB
Schematic
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600"><style></style><rect class="boundary" x="0" y="0" fill="#000" width="800" height="600"/><rect class="pcb-boundary" fill="none" stroke="#fff" stroke-width="0.3" x="287.9171476830704" y="18.680475386154967" width="224.16570463385904" height="562.6390492276901"/><path class="pcb-board" d="M 287.9171476830704 579.0947369708024 L 512.0828523169295 579.0947369708024 L 512.0828523169295 18.680475386154967 L 287.9171476830704 18.680475386154967 Z" fill="none" stroke="rgba(255, 255, 255, 0.5)" stroke-width="1.8680475386154916"/><g transform="translate(399.99999999999994, 491.06298550526265) rotate(0) scale(1, -1)"><rect class="pcb-component" x="-92.00341107348555" y="-63.26302053769123" width="184.0068221469711" height="126.52604107538247"/><rect class="pcb-component-outline" x="-92.00341107348555" y="-63.26302053769123" width="184.0068221469711" height="126.52604107538247"/></g><g transform="translate(399.99999999999994, 74.7219015446197) rotate(0) scale(1, -1)"><rect class="pcb-component" x="-22.408933885047315" y="-7.536230560180458" width="44.81786777009463" height="15.072461120360916"/><rect class="pcb-component-outline" x="-22.408933885047315" y="-7.536230560180458" width="44.81786777009463" height="15.072461120360916"/></g><g transform="translate(399.99999999999886, 298.8876061784787) rotate(0) scale(1, -1)"><rect class="pcb-component" x="-79.39067539692857" y="-60.710237371727516" width="158.78135079385714" height="121.42047474345503"/><rect class="pcb-component-outline" x="-79.39067539692857" y="-60.710237371727516" width="158.78135079385714" height="121.42047474345503"/></g><g transform="translate(399.99999999999994, 168.12427847539428) rotate(0) scale(1, -1)"><rect class="pcb-component" x="-25.218641771309134" y="-9.340237693077457" width="50.43728354261827" height="18.680475386154914"/><rect class="pcb-component-outline" x="-25.218641771309134" y="-9.340237693077457" width="50.43728354261827" height="18.680475386154914"/></g><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="364.50598154192363" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="373.8485729749023" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="383.18641956713003" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="392.52901100010655" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="401.8668575923321" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="411.20944902530863" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="420.5425507767875" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="429.88988705051503" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="334.6182296697479" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="340.22188659323473" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="349.56447802621125" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="355.16813494969597" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="439.2277336427427" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="444.83613540697627" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="454.17398199920603" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="459.77763892269076" y="427.7999649675715" width="5.604131407561242" height="24.28456943276538"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="377.5910661149526" y="67.31378168463685" width="14.94435042016331" height="14.94435042016331"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="407.46458346488396" y="67.18567098443926" width="14.94435042016331" height="14.94435042016331"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="374.7813582286908" y="158.78404078231682" width="18.680475386154914" height="18.680475386154914"/><rect class="pcb-pad" fill="rgb(200, 52, 52)" x="406.5381663851541" y="158.78404078231682" width="18.680475386154914" height="18.680475386154914"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 415.8784040782316 168.12427847539428 L 415.8784040782316 75.59949159778691" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 415.8784040782316 75.59949159778691 L 414.93675867496563 74.65784619452091" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(77, 127, 196)" fill="none" d="M 417.51294567452015 211.3228778058775 L 417.51294567452015 211.3228778058775" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="bottom"/><path class="pcb-trace" stroke="rgb(77, 127, 196)" fill="none" d="M 417.51294567452015 211.3228778058775 L 417.51294567452015 158.96075572373783" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="bottom"/><path class="pcb-trace" stroke="rgb(77, 127, 196)" fill="none" d="M 417.51294567452015 158.96075572373783 L 391.68531451629235 133.13312456551" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="bottom"/><path class="pcb-trace" stroke="rgb(77, 127, 196)" fill="none" d="M 391.68531451629235 133.13312456551 L 391.24352716273984 132.51462227053648" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="bottom"/><path class="pcb-trace" stroke="rgb(77, 127, 196)" fill="none" d="M 391.24352716273984 132.51462227053648 L 391.24352716273984 132.51462227053648" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="bottom"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 460.71023737172334 256.8578068319553 L 460.71023737172334 253.09211376979653" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 460.71023737172334 253.09211376979653 L 418.9410014078043 211.3228778058775" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 418.9410014078043 211.3228778058775 L 417.51294567452015 211.3228778058775" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 417.51294567452015 211.3228778058775 L 417.51294567452015 211.3228778058775" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 391.24352716273984 132.51462227053648 L 391.24352716273984 132.51462227053648" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 391.24352716273984 132.51462227053648 L 391.24352716273984 161.00234723442273" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><path class="pcb-trace" stroke="rgb(200, 52, 52)" fill="none" d="M 391.24352716273984 161.00234723442273 L 384.1215959217683 168.12427847539428" stroke-width="2.802071307923237" stroke-linecap="round" stroke-linejoin="round" shape-rendering="crispEdges" data-layer="top"/><g><circle class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="417.51294567452015" cy="211.3228778058775" r="5.604142615846474"/><circle class="pcb-hole-inner" fill="rgb(255, 38, 226)" cx="417.51294567452015" cy="211.3228778058775" r="2.802071307923237"/></g><g><circle class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="391.24352716273984" cy="132.51462227053648" r="5.604142615846474"/><circle class="pcb-hole-inner" fill="rgb(255, 38, 226)" cx="391.24352716273984" cy="132.51462227053648" r="2.802071307923237"/></g><path class="pcb-silkscreen pcb-silkscreen-top" d="M 316.51737394192196 511.8583774504273 L 316.51737394192196 477.05829195176204" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_0"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 483.52058478406445 581.319524613845 L 316.51737394192196 581.319524613845 L 316.51737394192196 553.648087855097" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_1"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 483.52058478406445 511.86502022747527 L 483.52058478406445 477.051649174712" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_2"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 483.52058478406445 581.319524613845 L 483.52058478406445 553.6414450780532" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_3"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 404.11852176934 80.7658796895285 L 403.9334729801626 80.7658796895285 L 397.76707794395355 74.60090810554325" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_4"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 404.11852176934 68.06251755468242 L 404.11852176934 68.24946428015679 L 397.76707794395355 74.60090810554325" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_5"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 404.11852176934 68.06251755468242 L 404.11852176934 80.7658796895285" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_6"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 404.49288970436197 60.58986786052711 L 425.9765796435334 60.58986786052711" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_7"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 404.49288970436197 88.6128973187079 L 425.9765796435334 88.6128973187079" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_8"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 425.9765796435334 60.59081682867773 L 425.9765796435334 88.23758041553319" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_9"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 397.39413346115754 88.65560088544112 L 377.7775383563534 88.65560088544112" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_10"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 372.17435591694397 81.1815277390599 L 372.17435591694397 83.05004602565307 L 377.7775383563534 88.65560088544112" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_11"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 372.17435591694397 68.10664457364157 L 372.17435591694397 81.1815277390599" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_12"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 372.17435591694397 68.10664457364157 L 372.17435591694397 66.23575386667184 L 377.7775383563534 60.63257142726036" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_13"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 397.39413346115754 60.63257142726036 L 377.7775383563534 60.63257142726036" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_14"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 404.11852176934 74.60090810554325 L 397.76707794395355 74.60090810554325" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_15"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 357.5146959416595 354.9289202540914 L 442.4853040583382 354.9289202540914" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_16"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 343.9586859243851 278.33912435075234 L 343.9586859243851 317.5680442036829" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_17"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 457.90935787813055 279.6842867028357 L 457.90935787813055 319.4360880062029" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_18"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 362.63912394959146 242.84629210286596 L 442.4853040583382 242.84629210286596" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="null" data-pcb-silkscreen-path-id="pcb_silkscreen_path_19"/><path class="pcb-silkscreen pcb-silkscreen-top" d="M 415.8784040782316 151.31185062785485 L 371.04526315145984 151.31185062785485 L 371.04526315145984 184.93670632293373 L 415.8784040782316 184.93670632293373" fill="none" stroke="#f2eda1" stroke-width="1.8680475386154916" data-pcb-component-id="pcb_component_3" data-pcb-silkscreen-path-id="pcb_silkscreen_path_20"/><text x="0" y="0" fill="#f2eda1" font-family="Arial, sans-serif" font-size="7.472190154461966" text-anchor="middle" dominant-baseline="central" transform="matrix(1,0,0,1,399.99999999999994,141.9716129347774)" class="pcb-silkscreen-text pcb-silkscreen-top" data-pcb-silkscreen-text-id="pcb_component_3" stroke="#f2eda1">R1</text><g><path class="pcb-hole-outer" fill="rgb(200, 52, 52)" d="M469.58688544324053,531.909480412709 v11.208262815122481 a11.208262815122485,11.208262815122485 0 0 0 22.41652563024497,0 v-11.208262815122481 a11.208262815122485,11.208262815122485 0 0 0 -22.41652563024497,0 z"/><path class="pcb-hole-inner" fill="rgb(255, 38, 226)" d="M473.32297304828137,531.909480412709 v11.208262815122488 a7.472175210081655,7.472175210081655 0 0 0 14.94435042016331,0 v-11.208262815122488 a7.472175210081655,7.472175210081655 0 0 0 -14.94435042016331,0 z"/></g><g><path class="pcb-hole-outer" fill="rgb(200, 52, 52)" d="M469.58688544324053,451.96033725973217 v14.94435042016331 a11.208262815122485,11.208262815122485 0 0 0 22.41652563024497,0 v-14.94435042016331 a11.208262815122485,11.208262815122485 0 0 0 -22.41652563024497,0 z"/><path class="pcb-hole-inner" fill="rgb(255, 38, 226)" d="M473.32297304828137,451.96033725973217 v14.944350420163317 a7.472175210081655,7.472175210081655 0 0 0 14.94435042016331,0 v-14.944350420163317 a7.472175210081655,7.472175210081655 0 0 0 -14.94435042016331,0 z"/></g><g><path class="pcb-hole-outer" fill="rgb(200, 52, 52)" d="M307.99658892651433,451.96033725973217 v14.94435042016331 a11.208262815122485,11.208262815122485 0 0 0 22.41652563024497,0 v-14.94435042016331 a11.208262815122485,11.208262815122485 0 0 0 -22.41652563024497,0 z"/><path class="pcb-hole-inner" fill="rgb(255, 38, 226)" d="M311.73267653155517,451.96033725973217 v14.944350420163317 a7.472175210081655,7.472175210081655 0 0 0 14.94435042016331,0 v-14.944350420163317 a7.472175210081655,7.472175210081655 0 0 0 -14.94435042016331,0 z"/></g><g><path class="pcb-hole-outer" fill="rgb(200, 52, 52)" d="M307.99658892651433,531.909480412709 v11.208262815122481 a11.208262815122485,11.208262815122485 0 0 0 22.41652563024497,0 v-11.208262815122481 a11.208262815122485,11.208262815122485 0 0 0 -22.41652563024497,0 z"/><path class="pcb-hole-inner" fill="rgb(255, 38, 226)" d="M311.73267653155517,531.909480412709 v11.208262815122488 a7.472175210081655,7.472175210081655 0 0 0 14.94435042016331,0 v-11.208262815122488 a7.472175210081655,7.472175210081655 0 0 0 -14.94435042016331,0 z"/></g><g><circle class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="460.71023737172334" cy="340.91740552500204" r="18.68043802520414"/><circle class="pcb-hole-inner" fill="rgb(255, 38, 226)" cx="460.71023737172334" cy="340.91740552500204" r="12.142521958420096"/></g><g><circle class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="460.71023737172334" cy="256.8578068319553" r="18.68043802520414"/><circle class="pcb-hole-inner" fill="rgb(255, 38, 226)" cx="460.71023737172334" cy="256.8578068319553" r="12.142521958420096"/></g><g><circle class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="339.28976262827445" cy="256.8578068319553" r="18.68043802520414"/><circle class="pcb-hole-inner" fill="rgb(255, 38, 226)" cx="339.28976262827445" cy="256.8578068319553" r="12.142521958420096"/></g><g><circle class="pcb-hole-outer" fill="rgb(200, 52, 52)" cx="339.28976262827445" cy="340.91740552500204" r="18.68043802520414"/><circle class="pcb-hole-inner" fill="rgb(255, 38, 226)" cx="339.28976262827445" cy="340.91740552500204" r="12.142521958420096"/></g><circle class="pcb-hole" cx="345.82815317913105" cy="463.6379843798817" r="7.005282880470254" fill="#FF26E2"/><circle class="pcb-hole" cx="454.17184682086884" cy="463.6379843798817" r="7.005282880470254" fill="#FF26E2"/></svg>