fix + new case design
This commit is contained in:
parent
0d432e2fd8
commit
434b815d91
@ -232,7 +232,7 @@ class Spotify(object):
|
||||
data = {}
|
||||
|
||||
if uri:
|
||||
if uri.startswith('spotify:track:'):
|
||||
if uri.startswith('spotify:track:') or uri.startswith('spotify:episode:'):
|
||||
data = {
|
||||
"uris": [uri]
|
||||
}
|
||||
|
@ -4,15 +4,6 @@ module luniebox_back() {
|
||||
difference() {
|
||||
union() {
|
||||
cube([length+depth,height+depth,depth]);
|
||||
// screws RFID MC522
|
||||
translate([length/2-22,height*0.6-13.5,depth])
|
||||
screw();
|
||||
translate([length/2-22,height*0.6+13.5,depth])
|
||||
screw();
|
||||
translate([length/2+16.5,height*0.6-18,depth])
|
||||
screw();
|
||||
translate([length/2+16.5,height*0.6+18,depth])
|
||||
screw();
|
||||
// clips
|
||||
translate([clip_space,0,0])
|
||||
clip_screw();
|
||||
@ -35,11 +26,14 @@ module luniebox_back() {
|
||||
rotate([0,0,90])
|
||||
clip_screw();
|
||||
}
|
||||
// USB port hole
|
||||
translate([54+depth,14+depth,0])
|
||||
rounded_cube(s=[10,6,depth],r=1.5);
|
||||
translate([38,20+depth,-render_limiter])
|
||||
cube([10,1.5,depth+render_limiter*2]);
|
||||
// UPS hat hole
|
||||
translate([length-12-50,18,-render_limiter])
|
||||
cube([45,6,depth+render_limiter*2]);
|
||||
// light holes
|
||||
translate([20,21,-render_limiter])
|
||||
screw_hole(depth);
|
||||
translate([30,21,-render_limiter])
|
||||
screw_hole(depth);
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
hardware/case/square/luniebox-back.stl
Normal file
BIN
hardware/case/square/luniebox-back.stl
Normal file
Binary file not shown.
@ -18,18 +18,23 @@ module luniebox_bottom() {
|
||||
rotate([0,0,90])
|
||||
clip_screw();
|
||||
// screws Raspi Zero
|
||||
translate([length-10,5+depth,depth])
|
||||
translate([15,40+depth,depth])
|
||||
screw();
|
||||
translate([length-68,5+depth,depth])
|
||||
translate([73,40+depth,depth])
|
||||
screw();
|
||||
translate([length-10,28+depth,depth])
|
||||
translate([15,63+depth,depth])
|
||||
screw();
|
||||
translate([length-68,28+depth,depth])
|
||||
translate([73,63+depth,depth])
|
||||
screw();
|
||||
// screws UPS HAT
|
||||
translate([15,5+depth,depth])
|
||||
screw(h=24);
|
||||
translate([74,5+depth,depth])
|
||||
screw(h=24);
|
||||
// screws MCP
|
||||
translate([length/2-7.5,width/2-7+depth,depth])
|
||||
translate([length/2-7.5,width/2+35-7+depth,depth])
|
||||
screw();
|
||||
translate([length/2+7.5,width/2-7+depth,depth])
|
||||
translate([length/2+7.5,width/2+35-7+depth,depth])
|
||||
screw();
|
||||
}
|
||||
// clip holes
|
||||
@ -37,9 +42,9 @@ module luniebox_bottom() {
|
||||
clip_hole();
|
||||
translate([clip_length_space,depth+clip_d/2,0])
|
||||
clip_hole();
|
||||
translate([clip_space,width-clip_d/2,0])
|
||||
translate([clip_space,width-clip_d/2 - front_offset,0])
|
||||
clip_hole();
|
||||
translate([clip_length_space,width-clip_d/2,0])
|
||||
translate([clip_length_space,width-clip_d/2 - front_offset,0])
|
||||
clip_hole();
|
||||
}
|
||||
}
|
||||
|
BIN
hardware/case/square/luniebox-bottom.stl
Normal file
BIN
hardware/case/square/luniebox-bottom.stl
Normal file
Binary file not shown.
58
hardware/case/square/luniebox-front-panel.scad
Normal file
58
hardware/case/square/luniebox-front-panel.scad
Normal file
@ -0,0 +1,58 @@
|
||||
include<luniebox-helper.scad>
|
||||
|
||||
module luniebox_front_panel() {
|
||||
|
||||
grill_width=2;
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
cube([length+depth,height+depth,depth]);
|
||||
}
|
||||
// speaker hole middle
|
||||
translate([length/2,height/2,-depth / 2])
|
||||
cylinder(d=103,h=depth*2);
|
||||
}
|
||||
for ( i = [grill_width*2 : grill_width*2 : 51.5] ) {
|
||||
translate([length/2,height/2,depth/2])
|
||||
difference () {
|
||||
cylinder (h = depth, r=i+grill_width/2, center = true);
|
||||
cylinder (h = depth*2, r=i-grill_width/2, center = true);
|
||||
}
|
||||
}
|
||||
|
||||
translate([length/2,height/2,0])
|
||||
rotate([0,0,-45])
|
||||
translate([-grill_width/2,grill_width*1.5,0])
|
||||
cube([grill_width,51.5,depth]);
|
||||
|
||||
translate([length/2,height/2,0])
|
||||
rotate([0,0,45])
|
||||
translate([-grill_width/2,grill_width*1.5,0])
|
||||
cube([grill_width,51.5,depth]);
|
||||
|
||||
translate([length/2,height/2,0])
|
||||
rotate([0,0,-135])
|
||||
translate([-grill_width/2,grill_width*1.5,0])
|
||||
cube([grill_width,51.5,depth]);
|
||||
|
||||
translate([length/2,height/2,0])
|
||||
rotate([0,0,135])
|
||||
translate([-grill_width/2,grill_width*1.5,0])
|
||||
cube([grill_width,51.5,depth]);
|
||||
|
||||
|
||||
// screws front
|
||||
translate([5,5+depth,depth])
|
||||
screw(h=front_offset-depth);
|
||||
translate([5,width-5+depth,depth])
|
||||
screw(h=front_offset-depth);
|
||||
translate([length-5,5+depth,depth])
|
||||
screw(h=front_offset-depth);
|
||||
translate([length-5,width-5+depth,depth])
|
||||
screw(h=front_offset-depth);
|
||||
}
|
||||
|
||||
luniebox_front_panel();
|
||||
|
||||
|
||||
|
@ -4,24 +4,15 @@ module luniebox_front() {
|
||||
difference() {
|
||||
union() {
|
||||
cube([length+depth,height+depth,depth]);
|
||||
// screws speaker right
|
||||
translate([height/2-22.5,height/2-22.5,depth])
|
||||
screw();
|
||||
translate([height/2+22.5,height/2-22.5,depth])
|
||||
screw();
|
||||
translate([height/2-22.5,height/2+22.5,depth])
|
||||
screw();
|
||||
translate([height/2+22.5,height/2+22.5,depth])
|
||||
screw();
|
||||
// screws speaker left
|
||||
translate([length-height/2-22.5,height/2-22.5,depth])
|
||||
screw();
|
||||
translate([length-height/2+22.5,height/2-22.5,depth])
|
||||
screw();
|
||||
translate([length-height/2-22.5,height/2+22.5,depth])
|
||||
screw();
|
||||
translate([length-height/2+22.5,height/2+22.5,depth])
|
||||
screw();
|
||||
// screws speaker middle
|
||||
translate([length/2-40.5,height/2-40.5,depth])
|
||||
screw(d=10);
|
||||
translate([length/2+40.5,height/2-40.5,depth])
|
||||
screw(d=10);
|
||||
translate([length/2-40.5,height/2+40.5,depth])
|
||||
screw(d=10);
|
||||
translate([length/2+40.5,height/2+40.5,depth])
|
||||
screw(d=10);
|
||||
// clips
|
||||
translate([clip_space,0,0])
|
||||
clip_screw();
|
||||
@ -44,29 +35,27 @@ module luniebox_front() {
|
||||
rotate([0,0,90])
|
||||
clip_screw();
|
||||
}
|
||||
// speaker hole right
|
||||
translate([height/2,height/2,-depth / 2])
|
||||
cylinder(d=50,h=depth*2);
|
||||
// speaker hole left
|
||||
translate([length-height/2,height/2,-depth / 2])
|
||||
cylinder(d=50,h=depth * 2);
|
||||
// screw holes speaker right
|
||||
translate([height/2-22.5,height/2-22.5,depth])
|
||||
// speaker hole middle
|
||||
translate([length/2,height/2,-depth / 2])
|
||||
cylinder(d=103,h=depth*2);
|
||||
// screw holes speaker middle
|
||||
translate([length/2-40.5,height/2-40.5,depth])
|
||||
screw_hole(depth,d=5);
|
||||
translate([length/2+40.5,height/2-40.5,depth])
|
||||
screw_hole(depth,d=5);
|
||||
translate([length/2-40.5,height/2+40.5,depth])
|
||||
screw_hole(depth,d=5);
|
||||
translate([length/2+40.5,height/2+40.5,depth])
|
||||
screw_hole(depth,d=5);
|
||||
|
||||
// screws holes front panel
|
||||
translate([5,5+depth,depth])
|
||||
screw_hole(depth);
|
||||
translate([height/2+22.5,height/2-22.5,depth])
|
||||
translate([5,width-5+depth,depth])
|
||||
screw_hole(depth);
|
||||
translate([height/2-22.5,height/2+22.5,depth])
|
||||
translate([length-5,5+depth,depth])
|
||||
screw_hole(depth);
|
||||
translate([height/2+22.5,height/2+22.5,depth])
|
||||
screw_hole(depth);
|
||||
// screw holes speaker left
|
||||
translate([length-height/2-22.5,height/2-22.5,depth])
|
||||
screw_hole(depth);
|
||||
translate([length-height/2+22.5,height/2-22.5,depth])
|
||||
screw_hole(depth);
|
||||
translate([length-height/2-22.5,height/2+22.5,depth])
|
||||
screw_hole(depth);
|
||||
translate([length-height/2+22.5,height/2+22.5,depth])
|
||||
translate([length-5,width-5+depth,depth])
|
||||
screw_hole(depth);
|
||||
}
|
||||
}
|
||||
|
BIN
hardware/case/square/luniebox-front.stl
Normal file
BIN
hardware/case/square/luniebox-front.stl
Normal file
Binary file not shown.
@ -4,12 +4,12 @@ $fs = 0.05;
|
||||
render_limiter = 0.001;
|
||||
|
||||
depth = 2;
|
||||
length = 100;
|
||||
width = 100;
|
||||
height = 100;
|
||||
length = 120;
|
||||
width = 120;
|
||||
height = 120;
|
||||
|
||||
|
||||
clip_space=20;
|
||||
front_offset=10+depth*2;
|
||||
clip_space=30;
|
||||
clip_d=5;
|
||||
clip_h=6;
|
||||
clip_length_space=length - clip_space + depth;
|
||||
@ -44,9 +44,9 @@ module clip(width=15) {
|
||||
cube([width +render_limiter * 2,depth + render_limiter * 2,depth + render_limiter * 2]);
|
||||
}
|
||||
|
||||
module screw_hole(depth=0,d=clip_d/2) {
|
||||
module screw_hole(depth=0,d=clip_d/2,height=clip_h) {
|
||||
z= -depth - render_limiter;
|
||||
h=7+depth;
|
||||
h=height+depth+1;
|
||||
translate([0,0,z])
|
||||
cylinder(d=d,h=h);
|
||||
}
|
||||
@ -54,7 +54,7 @@ module screw_hole(depth=0,d=clip_d/2) {
|
||||
module screw(d=clip_d,h=clip_h) {
|
||||
difference() {
|
||||
cylinder(d=d,h=h);
|
||||
screw_hole(d=d/2);
|
||||
screw_hole(d=d/2,height=h);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,9 @@ module luniebox_side() {
|
||||
translate([clip_d/2+depth,clip_height_space+depth,0])
|
||||
clip_hole();
|
||||
|
||||
translate([width-clip_d/2,clip_space+depth,0])
|
||||
translate([width-clip_d/2-front_offset,clip_space+depth,0])
|
||||
clip_hole();
|
||||
translate([width-clip_d/2,clip_height_space+depth,0])
|
||||
translate([width-clip_d/2-front_offset,clip_height_space+depth,0])
|
||||
clip_hole();
|
||||
|
||||
}
|
||||
|
BIN
hardware/case/square/luniebox-side.stl
Normal file
BIN
hardware/case/square/luniebox-side.stl
Normal file
Binary file not shown.
@ -4,6 +4,15 @@ module luniebox_top() {
|
||||
difference() {
|
||||
union() {
|
||||
cube([length+depth,width+depth,depth]);
|
||||
// screws RFID MC522
|
||||
translate([length/2-22,height*0.55-13.5,depth])
|
||||
screw();
|
||||
translate([length/2-22,height*0.55+13.5,depth])
|
||||
screw();
|
||||
translate([length/2+16.5,height*0.55-18,depth])
|
||||
screw();
|
||||
translate([length/2+16.5,height*0.55+18,depth])
|
||||
screw();
|
||||
// clips
|
||||
translate([clip_h,clip_space,0])
|
||||
rotate([0,0,90])
|
||||
@ -19,27 +28,20 @@ module luniebox_top() {
|
||||
clip_screw();
|
||||
}
|
||||
// clip holes
|
||||
translate([clip_space,depth+clip_d/2,0])
|
||||
translate([clip_space,depth+clip_d/2+front_offset,0])
|
||||
clip_hole();
|
||||
translate([clip_length_space,depth+clip_d/2,0])
|
||||
translate([clip_length_space,depth+clip_d/2+front_offset,0])
|
||||
clip_hole();
|
||||
translate([clip_space,width-clip_d/2,0])
|
||||
clip_hole();
|
||||
translate([clip_length_space,width-clip_d/2,0])
|
||||
clip_hole();
|
||||
// right btn hole
|
||||
translate([length/2-25+depth,(width+depth)/2,-depth/2])
|
||||
cylinder(d=30,h=depth*2);
|
||||
translate([length/2-10+depth,(width+depth)/6+front_offset,-depth/2])
|
||||
cylinder(d=3,h=depth*2);
|
||||
// left button hole
|
||||
translate([length/2+25+depth,(width+depth)/2,-depth/2])
|
||||
cylinder(d=30,h=depth*2);
|
||||
// led holes
|
||||
translate([length/2+depth,(width+depth)/2-16.666,-depth/2])
|
||||
cylinder(d=2,h=depth*2);
|
||||
translate([length/2+depth,(width+depth)/2,-depth/2])
|
||||
cylinder(d=2,h=depth*2);
|
||||
translate([length/2+depth,(width+depth)/2+16.666,-depth/2])
|
||||
cylinder(d=2,h=depth*2);
|
||||
translate([length/2+10+depth,(width+depth)/6+front_offset,-depth/2])
|
||||
cylinder(d=3,h=depth*2);
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
hardware/case/square/luniebox-top.stl
Normal file
BIN
hardware/case/square/luniebox-top.stl
Normal file
Binary file not shown.
@ -1,6 +1,7 @@
|
||||
include<luniebox-helper.scad>
|
||||
use<luniebox-bottom.scad>
|
||||
use<luniebox-front.scad>
|
||||
use<luniebox-front-panel.scad>
|
||||
use<luniebox-side.scad>
|
||||
use<luniebox-top.scad>
|
||||
use<luniebox-back.scad>
|
||||
@ -9,10 +10,15 @@ color(c=[1,0.1,0.1])
|
||||
luniebox_bottom();
|
||||
|
||||
color(c=[0.2,1,0.2])
|
||||
translate([0,width+depth,depth])
|
||||
translate([0,width+depth-front_offset,depth])
|
||||
rotate([90,0,0])
|
||||
luniebox_front();
|
||||
|
||||
color(c=[0.2,1,0.9])
|
||||
translate([0,width+depth,depth])
|
||||
rotate([90,0,0])
|
||||
luniebox_front_panel();
|
||||
|
||||
color(c=[0.3,0.3,1])
|
||||
translate([-depth,0,0])
|
||||
rotate([90,0,90])
|
||||
|
BIN
hardware/case/square/luniebox.stl
Normal file
BIN
hardware/case/square/luniebox.stl
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user