From 13a391c8d63536f4d353dc39449536a350ad5d8b Mon Sep 17 00:00:00 2001 From: redfast00 Date: Thu, 3 Feb 2022 13:14:07 +0100 Subject: [PATCH] Work some more on maze --- src/modules/puzzle_maze/3d/case.scad | 29 ++++++++++++++++++++++++- src/modules/puzzle_maze/puzzle_maze.ino | 6 +++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/modules/puzzle_maze/3d/case.scad b/src/modules/puzzle_maze/3d/case.scad index ab71cdf..3b5c3ba 100644 --- a/src/modules/puzzle_maze/3d/case.scad +++ b/src/modules/puzzle_maze/3d/case.scad @@ -111,7 +111,34 @@ module back_panel() { } } +module under_panel() { + difference() { + union() { + ccube([front_panel_height, front_panel_width, 40+container_wall_thickness], center=[0, 1, 0]); + } + union() { + translate([container_wall_thickness, 0, container_wall_thickness]) ccube([front_panel_height-2*container_wall_thickness, front_panel_width-2*container_wall_thickness, cut], center=[0, 1, 0]); + translate([front_panel_height/2, 0, -1]) cylinder(d=10, h=cut); + translate([container_wall_thickness+1, 0, container_wall_thickness+7]) rotate([0, -90, 0]) cylinder(d=12, h=cut); + // Holes for M3 bolts + translate([0, 0, -1]) { + translate([container_wall_thickness + 10, -front_panel_width/2 + container_wall_thickness + 5]) cylinder(d=3.5, h=cut); + translate([container_wall_thickness + 10, front_panel_width/2 - container_wall_thickness - 5]) cylinder(d=3.5, h=cut); + translate([front_panel_height-container_wall_thickness-10, -front_panel_width/2 + container_wall_thickness + 5]) cylinder(d=3.5, h=cut); + translate([front_panel_height-container_wall_thickness-10, front_panel_width/2 - container_wall_thickness - 5]) cylinder(d=3.5, h=cut); + } + } + } + translate([0, 0, 0]) { + translate([container_wall_thickness, -front_panel_width/2 + container_wall_thickness]) cube([4.5, 4.5, 45]); + translate([container_wall_thickness, front_panel_width/2 - container_wall_thickness - 5 + 0.5]) cube([4.5, 4.5, 45]); + translate([front_panel_height-container_wall_thickness-5 + 0.5, -front_panel_width/2 + container_wall_thickness]) cube([4.5, 4.5, 45]); + translate([front_panel_height-container_wall_thickness-5 + 0.5, front_panel_width/2 - container_wall_thickness - 5 + 0.5]) cube([4.5, 4.5, 45]); + } +} + // front_panel(); // button(); -translate([0, 0, -13-container_wall_thickness]) back_panel(); +/* translate([0, 0, -13-container_wall_thickness]) back_panel(); */ +translate([0, 0, -13 - 40 - 2*container_wall_thickness]) under_panel(); diff --git a/src/modules/puzzle_maze/puzzle_maze.ino b/src/modules/puzzle_maze/puzzle_maze.ino index 4ab2aca..1fcb320 100644 --- a/src/modules/puzzle_maze/puzzle_maze.ino +++ b/src/modules/puzzle_maze/puzzle_maze.ino @@ -8,6 +8,12 @@ #define LED_CLK_PIN 2 #define LED_CS_PIN 5 +// yellow = up A0 +// blue = down A1 +// orange = left A2 +// green = right A3 +#define + LedControl lc = LedControl(LED_DIN_PIN, LED_CLK_PIN, LED_CS_PIN, 1); void setup() {