3 key_interface_size = 19;
4 key_interface_corner_r = 5;
6 housing_inner_h = 10; // Chosen to let board fit inside
23 module pico_hole(d, x, y) {
24 translate([x, y, -slop/2])
25 cylinder(h=slop, d = d);
28 module pico_w(hole_d = 2.1) {
29 board_l = pico_board_l;
30 board_w = pico_board_w;
34 hole_x2 = board_l - 2.0;
35 hole_y_spacing = 11.4;
36 hole_y = (board_w - hole_y_spacing)/2;
40 cube([board_l, board_w, board_h]);
42 pico_hole(hole_d, hole_x1, hole_y);
43 pico_hole(hole_d, hole_x2, hole_y);
44 pico_hole(hole_d, hole_x1, hole_y + hole_y_spacing);
45 pico_hole(hole_d, hole_x2, hole_y + hole_y_spacing);
50 total_h = pico_total_h;
55 translate([board_l - total_l, (board_w-usb_w)/2, total_h-usb_h])
56 cube([usb_l, usb_w, usb_h]);
64 translate([button_x, button_y, epsilon])
65 cube([button_l, button_w, button_h]);
72 translate([wifi_x, (board_w-wifi_w)/2, epsilon])
73 cube([wifi_l, wifi_w, wifi_h]);
77 translate([pico_board_l + wiring_l, 0, 0])
83 module key_interface_shape(thick = thickness) {
84 inner = key_interface_size - 2*key_interface_corner_r;
87 square([inner, inner], center=true);
88 circle(r=key_interface_corner_r);
92 module key_interface() {
95 key_interface_shape();
97 #translate([0, 0, 6 - epsilon])
102 module housing(length = pico_board_l) {
103 inner_squish = housing_inner_h / housing_inner_w;
104 housing_outer_w = housing_inner_w + 2 * thickness;
105 housing_outer_h = housing_inner_h + 2 * thickness;
106 outer_squish = housing_outer_h / housing_outer_w;
109 linear_extrude(length)
111 scale([1, outer_squish])
112 circle(d = housing_outer_w);
113 scale([1, inner_squish])
114 circle(d = housing_inner_w);
119 !union() {housing(); hull() {
120 at_key() key_interface_shape(epsilon);
121 translate([pico_board_l-wiring_l, 0, 0])
126 translate([0, -pico_board_w/2, -1])