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/index.js
PCB
Schematic
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _seveibar = require("@tsci/seveibar.red-led");
var _seveibar2 = require("@tsci/seveibar.push-button");
var _seveibar3 = require("@tsci/seveibar.smd-usb-c");
var _default = () => {
const USBC = (0, _seveibar3.useUsbC)("USBC");
const Button = (0, _seveibar2.usePushButton)("SW1");
const Led = (0, _seveibar.useRedLed)("LED");
return /*#__PURE__*/React.createElement("board", {
width: "12mm",
height: "30mm"
}, /*#__PURE__*/React.createElement(USBC, {
GND: "net.GND",
pcbY: -10,
VBUS: "net.VBUS"
}), /*#__PURE__*/React.createElement(Led, {
neg: "net.GND",
pcbY: 12,
schX: -10,
schY: 0,
schRotation: "90deg"
}), /*#__PURE__*/React.createElement(Button, {
pcbY: 0,
pin2: ".R1 > .pos",
pin3: "net.VBUS",
schX: -4,
schY: 0
}), /*#__PURE__*/React.createElement("resistor", {
name: "R1",
footprint: "0603",
resistance: "1k",
pcbY: 7,
schX: -7,
schY: -4,
schRotation: 90,
supplierPartNumbers: {
jlcpcb: ["C22548"]
}
}), /*#__PURE__*/React.createElement("trace", {
from: ".R1 > .neg",
to: Led.pos
}));
};
exports.default = _default;