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/schematic.svg

PCBPCB preview for dist/schematic.svg
SchematicSchematic preview for dist/schematic.svg
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="600" style="background-color: rgb(245, 241, 237)" data-real-to-screen-transform="matrix(76.5912727283,0,0,-76.5912727283,952.1327267526,206.7964363664)"><style>
              .boundary { fill: rgb(245, 241, 237); }
              .schematic-boundary { fill: none; stroke: #fff; }
              .component { fill: none; stroke: rgb(132, 0, 0); }
              .chip { fill: rgb(255, 255, 194); stroke: rgb(132, 0, 0); }
              .component-pin { fill: none; stroke: rgb(132, 0, 0); }
              .trace:hover {
                filter: invert(1);
              }
              .trace:hover .trace-crossing-outline {
                opacity: 0;
              }
              .text { font-family: sans-serif; fill: rgb(0, 150, 0); }
              .pin-number { fill: rgb(169, 0, 0); }
              .port-label { fill: rgb(0, 100, 100); }
              .component-name { fill: rgb(0, 100, 100); }
            </style><rect class="boundary" x="0" y="0" width="1200" height="600"/><g data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_0"><rect class="component chip" x="890.8597085699599" y="84.25040000112" width="122.54603636528009" height="245.09207273056" stroke-width="1.531825454566px" fill="rgb(255, 255, 194)" stroke="rgb(132, 0, 0)"/><rect class="component-overlay" x="890.8597085699599" y="84.25040000112" width="122.54603636528009" height="245.09207273056" fill="transparent"/><text x="1021.06487220807" y="57.44345454621498" fill="#006464" text-anchor="start" dominant-baseline="middle" font-family="sans-serif" font-size="13.786429091094px" transform="rotate(0, 1021.06487220807, 57.44345454621498)">TYPE-C-31-M-12</text><text x="1021.06487220807" y="42.12520000055497" fill="#006464" text-anchor="start" dominant-baseline="middle" font-family="sans-serif" font-size="13.786429091094px" transform="rotate(0, 1021.06487220807, 42.12520000055497)">USBC</text><line class="component-pin" x1="906.17796311562" y1="358.447156368434" x2="906.17796311562" y2="329.34247273168" stroke-width="1.531825454566px"/><circle class="component-pin" cx="906.17796311562" cy="359.978981823" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="904.646137661054" y="344.66072727734" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="rotate(-90 904.646137661054 344.66072727734)">1</text><text class="pin-number" x="906.17796311562" y="321.68334545885" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="11.488690909245px" transform="rotate(-90 906.17796311562 321.68334545885)">GND1</text><line class="component-pin" x1="921.49621766128" y1="358.447156368434" x2="921.49621766128" y2="329.34247273168" stroke-width="1.531825454566px"/><circle class="component-pin" cx="921.49621766128" cy="359.978981823" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="919.964392206714" y="344.66072727734" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="rotate(-90 919.964392206714 344.66072727734)">2</text><text class="pin-number" x="921.49621766128" y="321.68334545885" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="start" dominant-baseline="middle" font-size="11.488690909245px" transform="rotate(-90 921.49621766128 321.68334545885)">GND2</text><line class="component-pin" x1="1042.510428571994" y1="99.56865454678" x2="1013.40574493524" y2="99.56865454678" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="99.56865454678" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="98.03682909221399" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">3</text><text class="pin-number" x="1005.74661766241" y="99.56865454678" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">VBUS1</text><line class="component-pin" x1="1042.510428571994" y1="114.88690909244" x2="1013.40574493524" y2="114.88690909244" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="114.88690909244" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="113.355083637874" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">4</text><text class="pin-number" x="1005.74661766241" y="114.88690909244" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">VBUS2</text><line class="component-pin" x1="1042.510428571994" y1="314.02421818602" x2="1013.40574493524" y2="314.02421818602" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="314.02421818602" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="312.492392731454" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">5</text><text class="pin-number" x="1005.74661766241" y="314.02421818602" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">SBU2</text><line class="component-pin" x1="1042.510428571994" y1="252.75120000338" x2="1013.40574493524" y2="252.75120000338" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="252.75120000338" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="251.21937454881402" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">6</text><text class="pin-number" x="1005.74661766241" y="252.75120000338" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">CC1</text><line class="component-pin" x1="1042.510428571994" y1="206.7964363664" x2="1013.40574493524" y2="206.7964363664" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="206.7964363664" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="205.264610911834" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">7</text><text class="pin-number" x="1005.74661766241" y="206.7964363664" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">DM2</text><line class="component-pin" x1="1042.510428571994" y1="160.84167272942" x2="1013.40574493524" y2="160.84167272942" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="160.84167272942" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="159.309847274854" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">8</text><text class="pin-number" x="1005.74661766241" y="160.84167272942" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">DP1</text><line class="component-pin" x1="1042.510428571994" y1="191.47818182074002" x2="1013.40574493524" y2="191.47818182074002" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="191.47818182074002" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="189.946356366174" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">9</text><text class="pin-number" x="1005.74661766241" y="191.47818182074002" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">DM1</text><line class="component-pin" x1="1042.510428571994" y1="176.15992727508" x2="1013.40574493524" y2="176.15992727508" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="176.15992727508" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="174.62810182051402" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">10</text><text class="pin-number" x="1005.74661766241" y="176.15992727508" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">DP2</text><line class="component-pin" x1="1042.510428571994" y1="298.70596364036" x2="1013.40574493524" y2="298.70596364036" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="298.70596364036" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="297.174138185794" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">11</text><text class="pin-number" x="1005.74661766241" y="298.70596364036" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">SBU1</text><line class="component-pin" x1="1042.510428571994" y1="268.06945454904" x2="1013.40574493524" y2="268.06945454904" stroke-width="1.531825454566px"/><circle class="component-pin" cx="1044.04225402656" cy="268.06945454904" r="1.531825454566" stroke-width="1.531825454566px"/><text class="pin-number" x="1028.7239994809" y="266.537629094474" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="middle" dominant-baseline="auto" font-size="11.488690909245px" transform="">12</text><text class="pin-number" x="1005.74661766241" y="268.06945454904" style="font-family: sans-serif;" fill="rgb(169, 0, 0)" text-anchor="end" dominant-baseline="middle" font-size="11.488690909245px" transform="">CC2</text></g><g data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_1"><rect class="component-overlay" x="161.4451277079588" y="166.46681152716815" width="35.19037341654473" height="80.5860590582445" fill="transparent"/><path d="M 186.50311145011284 196.39093753171497 L 196.63550112450352 216.65570922136857" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 186.52025257694947 197.02057906655975 L 186.52025257694947 166.46681152716815" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 176.37072177572242 216.65570922136857 L 186.50311145011284 196.39093753171497" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 196.63550112450352 216.65570922136857 L 176.37072177572242 216.65570922136857" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 176.37072177572242 196.39093753171497 L 196.63550112450352 196.39093753171497" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 186.50311145011284 216.81224646457068 L 186.50311145011284 247.05287058541265" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 164.3568062137433 194.86781284573092 L 163.06400680310765 187.41224219843093 L 170.16882771694833 190.03953730857526" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 173.51289459379336 200.66878988740874 L 172.82870475451128 199.74789471976004 L 165.90057990685466 190.42240942181675 L 165.82781819776278 190.37415691999794" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 162.73792711859443 208.46018262911326 L 161.4451277079588 201.00461198181324 L 168.54994862179944 203.6319070919576" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 171.8940154986445 214.26115967079107 L 171.2098256593624 213.34026450314235 L 164.28170081170578 204.0147792051991 L 164.20893910261393 203.96652670338025" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><text x="210.99487123124126" y="207.52877913884618" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="start" dominant-baseline="middle" font-size="13.786429091094px"></text><text x="169.07384058638814" y="182.69770470127676" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="end" dominant-baseline="middle" font-size="13.786429091094px">LED</text><circle cx="186.5595209224774" cy="247.86538910215083" r="1.531825454566px" stroke-width="1.531825454566px" fill="none" stroke="rgb(132, 0, 0)"/><circle cx="186.59425506465988" cy="165.72748363064917" r="1.531825454566px" stroke-width="1.531825454566px" fill="none" stroke="rgb(132, 0, 0)"/></g><g data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_2"><rect class="component-overlay" x="608.4839884731181" y="199.9172763193987" width="74.71866972398402" height="10.79262942269014" fill="transparent"/><path d="M 642.2629095770549 199.9172763193987 L 642.2629095770549 203.76928119872298" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 642.2629095770549 199.9172763193987 L 650.9492123653096 199.9172763193987" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 650.9492123653096 199.9172763193987 L 650.9492123653096 203.76928119872298" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 608.4839884731181 210.70799096027068 L 632.557108016641 210.70799096027068" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 633.5766067888002 203.74431244381364 L 659.635515919477 203.74431244381364" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 660.7886128486562 210.70990574208884 L 683.2026581971021 210.70990574208884" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><text x="646.3283567174803" y="184.2312304820974" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="start" dominant-baseline="middle" font-size="13.786429091094px">SW1</text><text x="633.4602033725077" y="224.00025315972158" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="start" dominant-baseline="middle" font-size="13.786429091094px"></text><circle cx="609.5845054935693" cy="210.70592299590695" r="1.531825454566px" stroke-width="1.531825454566px" fill="none" stroke="rgb(132, 0, 0)"/><circle cx="681.9507661852309" cy="210.73954656463468" r="1.531825454566px" stroke-width="1.531825454566px" fill="none" stroke="rgb(132, 0, 0)"/></g><g data-circuit-json-type="schematic_component" data-schematic-component-id="schematic_component_3"><rect class="component-overlay" x="409.3969883570299" y="473.9582230606015" width="20.26477934878085" height="81.05909441774173" fill="transparent"/><path d="M 419.5293780314203 473.9582230606015 L 419.5293780314203 494.22299475025505" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 419.5293780314203 534.7525381295624 L 419.5293780314203 555.0173174783432" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><path d="M 429.66176770581075 514.4877587807814 L 429.66176770581075 534.752530470435 L 409.3969883570299 534.752530470435 L 409.3969883570299 494.22297943200044 L 429.66176770581075 494.22297943200044 L 429.66176770581075 514.4877587807813" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.531825454566px"/><text x="433.56809494531745" y="500.90692364307193" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="start" dominant-baseline="middle" font-size="13.786429091094px">R1</text><text x="433.56809494531745" y="525.4161309161279" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="start" dominant-baseline="middle" font-size="13.786429091094px">1kΩ</text><circle cx="419.50209622007435" cy="472.2778181960698" r="1.531825454566px" stroke-width="1.531825454566px" fill="none" stroke="rgb(132, 0, 0)"/><circle cx="419.46023908952844" cy="554.0452363631301" r="1.531825454566px" stroke-width="1.531825454566px" fill="none" stroke="rgb(132, 0, 0)"/></g><g class="trace" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_0"><path d="M 681.9507661852308 210.73954656463468 L 681.9507661852308 472.2778181960698 L 419.50209622007424 472.2778181960698" class="trace-invisible-hover-outline" stroke="rgb(0, 150, 0)" fill="none" stroke-width="12.254603636528px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path d="M 681.9507661852308 210.73954656463468 L 681.9507661852308 472.2778181960698 L 419.50209622007424 472.2778181960698" stroke="rgb(0, 150, 0)" fill="none" stroke-width="1.531825454566px" stroke-linecap="round" stroke-linejoin="round"/></g><g class="trace" data-circuit-json-type="schematic_trace" data-schematic-trace-id="schematic_trace_1"><path d="M 419.4602390895284 554.0452363631301 L 186.55952092247742 554.0452363631301 L 186.55952092247742 247.86538910215083" class="trace-invisible-hover-outline" stroke="rgb(0, 150, 0)" fill="none" stroke-width="12.254603636528px" stroke-linecap="round" opacity="0" stroke-linejoin="round"/><path d="M 419.4602390895284 554.0452363631301 L 186.55952092247742 554.0452363631301 L 186.55952092247742 247.86538910215083" stroke="rgb(0, 150, 0)" fill="none" stroke-width="1.531825454566px" stroke-linecap="round" stroke-linejoin="round"/></g><path class="net-label" d="
    M 186.59425506465982,165.72748363064917
    L 178.3223976100034,161.59155490332097
    L 178.3223976100034,123.77589051493499
    L 194.86611251931623,123.77589051493499
    L 194.86611251931623,161.59155490332097
    Z
  " fill="#FFFFFF99" stroke="rgb(132, 0, 0)" stroke-width="1.531825454566px"/><text class="net-label-text" x="186.59425506465982" y="158.83426908510216" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="13.786429091094px" transform="rotate(-90 186.59425506465982 158.83426908510216)">GND</text><path class="net-label" d="
    M 681.9507661852308,210.73954656463468
    L 686.086694912559,202.46768910997827
    L 730.8568468646746,202.46768910997827
    L 730.8568468646746,219.0114040192911
    L 686.086694912559,219.0114040192911
    Z
  " fill="#FFFFFF99" stroke="rgb(132, 0, 0)" stroke-width="1.531825454566px"/><text class="net-label-text" x="688.8439807307778" y="210.73954656463468" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="13.786429091094px" transform="">VBUS</text></svg>