mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-22 23:23:01 +02:00
Parametric potentiometers added, changes PCB "potentiometer" parameters.
The first one is now the type that defaults to the previous BigTreeTech version. The second parameter is the shaft length overrride. Added ESP32_DOIT_V1, ArduinoNano and KY_040 breakout PCBs.
This commit is contained in:
@@ -141,7 +141,7 @@ test_pcb = ["test_pcb", "Test PCB",
|
||||
[ 52, 194, 0, "2p54socket", 8, 1, false, 0, false, "red" ],
|
||||
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
[ 50, 240, 0, "potentiometer"],
|
||||
[ 75, 240, 0, "potentiometer", 7, 8],
|
||||
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
|
||||
[ 30, 85, -90, "7seg", WT5011BSR, 2],
|
||||
],
|
||||
// accessories
|
||||
|
@@ -21,7 +21,7 @@ include <../vitamins/pcbs.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
||||
function spacing(p) = let(w = pcb_width(p)) w < 22 ? w + 3 : w + 10;
|
||||
function spacing(p) = let(w = pcb_width(p)) w < 22 ? w + 3 : w + 7;
|
||||
|
||||
module pcbs() {
|
||||
layout([for(p = pcbs) spacing(p)], 0)
|
||||
@@ -29,9 +29,9 @@ module pcbs() {
|
||||
rotate(90)
|
||||
pcb_assembly(pcbs[$i], 5 + $i, 3);
|
||||
|
||||
translate([0, 45])
|
||||
translate([0, 65])
|
||||
layout([for(p = tiny_pcbs) pcb_length(p)], 3)
|
||||
translate([0, pcb_width(tiny_pcbs[$i]) / 2])
|
||||
translate([0, -pcb_width(tiny_pcbs[$i]) / 2])
|
||||
pcb_assembly(tiny_pcbs[$i], 5 + $i, 3);
|
||||
|
||||
translate([0, 120])
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 180 KiB |
Binary file not shown.
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 169 KiB |
BIN
tests/png/potentiometers.png
Normal file
BIN
tests/png/potentiometers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
31
tests/potentiometers.scad
Normal file
31
tests/potentiometers.scad
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2021
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
//! Potentiometers and rotary encoders
|
||||
include <../core.scad>
|
||||
include <../utils/layout.scad>
|
||||
include <../vitamins/potentiometers.scad>
|
||||
|
||||
module potentiometers()
|
||||
layout([for(p = potentiometers) pot_size(p).x])
|
||||
hflip()
|
||||
potentiometer(potentiometers[$i], shaft_length = 30);
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
potentiometers();
|
Reference in New Issue
Block a user