aboutsummaryrefslogtreecommitdiff
path: root/3d-print/controller.scad
blob: bc5ac246e45c67383441636eb75b4ba0cc48d134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module via() {
     cylinder(h=10,r=1,center=true,$fn=12);
}
 
// TTGO T7
module esp32() {
     for(x=[011011]) {
          for(y=[0 : 9]) {
               translate([2.54*x,2.54*y,0]) via();
          }
     }
}
 
// https://learn.adafruit.com/stereo-3-7w-class-d-audio-amplifier/assembly
module amp() {
     for(x=[0 : 8]) {
          translate([0,2.54*x,0]) via();
     }
}
 
module wire_pack() {
     for(x=[0 : 4]) {
          translate([0,4*x,0]) via();
     }
}
 
difference() {
     union() {
          cube([40,80,1.25]);
          translate([12.5,63,0.5]) cube([15,10,3]);
     }
 
     translate([6.25,2,0]) esp32();
     translate([12,-2,-1]) cube([15,10,3]);
 
     // rows
 
     // row output pins wired here
     translate([5,35,0]) wire_pack();
     // 220Ω between these
     translate([15,35,0]) wire_pack();
     // these go to pins 3 of each qrd1114
 
     // same output pins wired here
     translate([25,35,0]) wire_pack();
     // 10k0Ω between these
     translate([35,35,0]) wire_pack();
     // these go to pins 1 of each qrd1114
 
     // columns: ouput pins directly to pins 2&4 of each qrd1114
 
 
     translate([30,60,0]) rotate([0,0,90]) amp();
}