Skip to content

Commit

Permalink
feat: svelte5 demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
BCsabaEngine committed Oct 22, 2024
1 parent e4995c9 commit d7c736e
Show file tree
Hide file tree
Showing 11 changed files with 501 additions and 600 deletions.
53 changes: 3 additions & 50 deletions demo/svelte/README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,5 @@
# PCB THT holder
# Svelte DEMO app

[Changelog](CHANGELOG.md)
This is a DEMO application that serves the purpose of being able to demonstrate the capabilities of SvelteESP32.

3D STL file generator for THT PCB panels, online access: https://segmentcontroller.github.io/pcb-tht-holder/

I make almost all of my printed circuit boards with online design software and entrust the manufacturing company to install the SMD components. I install the THT (through hole technology) components at home for two reasons:

- What they charge for meticulous manual work cannot be called cheap.
- Not all THT parts are needed, in many cases only 2 of the 6 relays are installed. This can reduce costs.

> I would also like to do the THT installation at home nicely. However, with many panels there are "traces of haste".
## That's why I created an **online tool** that:

- Based on the photo of the PCB, it helps to leave the place of the protruding (THT) parts empty.
- It creates a 3D format (STL) output that, if you print, will keep the parts straight during soldering.
- It can work without registration and without uploading (and storing) a photo of the PCB.

In its current state, it facilitates the installation of circular and oblong components. This is sufficient in the following cases: **relays, capacitors, resistors, terminals and pin-headers.** It automatically calculates the required area and volume based on the height of the parts. But it doesn't mean that there aren't any mistakes in it: if you experience anything, I welcome your comments.

## Try yout first PCB to STL

Click here: https://segmentcontroller.github.io/pcb-tht-holder/

### Set up a PCB image

Enter a PCB image with drag and drop or file selection, which will automatically flip and become transparent.

![alt text](./step1.png)

### Place the components

Place the THT parts by placing circles or squares. Adjust their height/depth exactly so that they are flush with the PCB. At the end, if necessary, add legs to support the PCB.

![alt text](./step2.png)

### Generate a 3D design in STL format

Click the Display 3D button and see the generated mesh. Rotate it, check that all components are in place. At the end, download the STL file in binary format. (It is also possible to download a text STL file for debug purposes).

![alt text](./step3.png)

### Check as a wireframe if necessary

If you want to analyze the location of the components, you can also see how things fit in the wireframe view.

![alt text](./step4.png)

### Print it with a 3D printer...

Use a PLA printer to save time and money. Practice shows that it is enough to produce the STL file once, of which 1-3 prints are enough to implant hundreds of PCBs.
With minimal functionality, it can emulate a working Svelte application, which has the translated application in the DIST folder, which can be installed on the ESP32. Thus, ESP32 can serve this reactive application consisting only of HTML, JS and CSS files.
1 change: 1 addition & 0 deletions demo/svelte/dist/assets/index-Bkee7wIT.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions demo/svelte/dist/assets/index-CS7uDKKX.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions demo/svelte/dist/assets/index-D2ud7X1T.js

This file was deleted.

1 change: 0 additions & 1 deletion demo/svelte/dist/assets/index-Dhz0GptE.css

This file was deleted.

Binary file modified demo/svelte/dist/favicon.png.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions demo/svelte/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<title>Svelte to ESP32 demo application</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#f3f4f6" />
<script type="module" crossorigin src="./assets/index-D2ud7X1T.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-Dhz0GptE.css">
<script type="module" crossorigin src="./assets/index-CS7uDKKX.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-Bkee7wIT.css">
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions demo/svelte/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default [
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'unicorn/filename-case': 'off',
'unicorn/prefer-global-this': 'off',
'no-alert': 'error',
'no-console': 'error',
'no-debugger': 'error'
Expand Down
Loading

0 comments on commit d7c736e

Please sign in to comment.