Skip to content

Commit

Permalink
add files for case
Browse files Browse the repository at this point in the history
  • Loading branch information
suapapa committed Dec 19, 2024
1 parent 6ab95d4 commit f0b8c6d
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 1 deletion.
5 changes: 5 additions & 0 deletions case/hangulclock_case.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
difference() {
cube([175,175,50]);
translate([5,5,-5]) cube([165,165,70]);
translate([2.5,2.5,2.5]) cube([170,170,70]);
}
Binary file added case/hangulclock_case.stl
Binary file not shown.
46 changes: 46 additions & 0 deletions case/hangulclock_light_pannel.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
difference() {
union() {
translate([-30,-30,0]) board_supports();
translate([0,50,0]) oled_supports();
cube([170-1, 170-1, 2], center=true);
translate([0,170/6,1]) cube([170-1, 5, 3], center=true);
translate([0,-170/6,1]) cube([170-1, 5, 3], center=true);
translate([-170/6,0,1]) cube([5,170-1, 3], center=true);
translate([+170/6,0,1]) cube([5,170-1, 3], center=true);
}
translate([-170/2,0,-1]) cube([10,10,5], center=true);
translate([170/2,0,-1]) cube([10,10,5], center=true);
translate([-170/2,33,-1]) cube([10,10,5], center=true);
translate([170/2,33,-1]) cube([10,10,5], center=true);
translate([-170/2,-33,-1]) cube([10,10,5], center=true);
translate([170/2,-33,-1]) cube([10,10,5], center=true);
translate([-170/2,33*2,-1]) cube([10,10,5], center=true);
translate([170/2,33*2,-1]) cube([10,10,5], center=true);
translate([-170/2,-33*2,-1]) cube([10,10,5], center=true);
translate([170/2,-33*2,-1]) cube([10,10,5], center=true);
}

module oled_supports() {
translate([-(38.5-3)/2,-(35.5-3)/2],0) {
support(3, 4);
translate([38.5-3,0,0]) support(3, 4);
translate([0,35.5-3,0]) support(3, 4);
translate([38.5-3,35.5-3,0]) support(3, 4);
}
}

module board_supports() {
translate([-(41.5-3)/2,-(46.5-3)/2],0) {
support(2, 4);
translate([41.5-2,0,0]) support(2, 4);
translate([0,46.5-2,0]) support(2, 4);
translate([41.5-2,46.5-2,0]) support(2, 4);
}
}

module support(in, h) {
translate([0,0,h/2]) difference() {
cylinder(h, in/2+1,in/2+1, center=true);
translate([0,0,-1]) cylinder(h+2, in/2, in/2, center=true);
}
}
Binary file added case/hangulclock_light_pannel.stl
Binary file not shown.
18 changes: 18 additions & 0 deletions case/hangulclock_light_tunnel.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
union() {
tunnel(0,0);
translate([33/2,0,0]) cube([2,170-1,15], center=true);
translate([-33/2,0,0]) cube([2,170-1,15], center=true);
translate([33/2+33,0,0]) cube([2,170-1,15], center=true);
translate([-33/2-33,0,0]) cube([2,170-1,15], center=true);
translate([0,33/2,0]) cube([170-1,2,15], center=true);
translate([0,-33/2,0]) cube([170-1,2,15], center=true);
translate([0,33/2+33,0]) cube([170-1,2,15], center=true);
translate([0,-33/2-33,0]) cube([170-1,2,15], center=true);
}

module tunnel(x, y) {
translate([x,y,0]) difference() {
cube([33*5+1,33*5+1,15], center=true);
translate([0,0,-1])cube([33*5-1-2,33*5-1-2,25], center=true);
}
}
Binary file added case/hangulclock_light_tunnel.stl
Binary file not shown.
5 changes: 4 additions & 1 deletion rusty_hangulclock/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn main() -> anyhow::Result<()> {
AnyIOPin::none(),
&SpiDriverConfig::new(),
)?;
let spi_config = SpiConfig::new().baudrate(26.MHz().into()).data_mode(MODE_3);
let spi_config = SpiConfig::new().baudrate(3.MHz().into()).data_mode(MODE_3);
let spi_bus = SpiBusDriver::new(&mut spi_driver, &spi_config)?;
let mut dotstar = apa102_spi::Apa102::new(spi_bus);

Expand Down Expand Up @@ -111,6 +111,9 @@ fn main() -> anyhow::Result<()> {
&mut disp,
&datetime_kst.format("%Y-%m-%d\n%H:%M:%S").to_string(),
)?;
let h := datetime_kst.hour();
let m := datetime_kst.minute();

std::thread::sleep(time::Duration::from_secs(1));
}
}
Expand Down
Binary file added tools/SOYO Maple Bold.otf
Binary file not shown.

0 comments on commit f0b8c6d

Please sign in to comment.