Mercurial > scad-parts
changeset 19:e28844f436b8
Add the microbit board
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sun, 26 Jun 2016 22:53:28 +0200 |
| parents | ae252a588be2 |
| children | 38d35227a863 |
| files | boards/microbit.scad |
| diffstat | 1 files changed, 73 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/boards/microbit.scad Sun Jun 26 22:53:28 2016 +0200 @@ -0,0 +1,73 @@ + +module _microbit_contact() { + color("gold") { + translate([0, 0, -0.25]) { + cylinder(r=2.5, h=1.5, $fn=10); + translate([-2.5, 0, 0]) cube([5, 8.5, 1.5]); + } + } +} + +module _microbit_pin() { + color("gold") { + translate([-0.4, 2.5, -0.25]) cube([0.8, 5.25, 1.5]); + } +} + +module _microbit_button() { + color("Silver") { + translate([-3.5, -3, -2]) cube([7, 6, 2.25]); + } + color("Gray") { + translate([0, 0, -3]) cylinder(r=1.6, h=1.25, $fn=6); + } +} + +module microbit() { + difference() { + union() { + color("DimGray") hull() { + translate([23, 18, 0]) cylinder(r=3.5, h=1, $fn=12); + translate([23, -18, 0]) cylinder(r=3.5, h=1, $fn=12); + translate([-23, 18, 0]) cylinder(r=3.5, h=1, $fn=12); + translate([-23, -18, 0]) cylinder(r=3.5, h=1, $fn=12); + } + color("Gold") intersection() { + hull() { + translate([23, 18, -1]) cylinder(r=3.75, h=3, $fn=12); + translate([23, -18, -1]) cylinder(r=3.75, h=3, $fn=12); + translate([-23, 18, -1]) cylinder(r=3.75, h=3, $fn=12); + translate([-23, -18, -1]) cylinder(r=3.75, h=3, $fn=12); + } + union() { + for (x=[22, 11.5, 0, -11.5, -22]) + translate([x, 15, 0]) _microbit_contact(); + translate([-25.3, 14, 0]) _microbit_pin(); + translate([25.3, 14, 0]) _microbit_pin(); + } + } + } + color("Gold") { + for (x=[22, 11.5, 0, -11.5, -22]) + translate([x, 15, -1]) cylinder(r=2, h=3, $fn=9); + } + } + for (x=[0:3]) { + translate([-18.6 + x * 1.27, 14, 0]) _microbit_pin(); + translate([18.6 - x * 1.27, 14, 0]) _microbit_pin(); + } + for (x=[0:4]) { + translate([-8.3 + x * 1.27, 14, 0]) _microbit_pin(); + translate([8.3 - x * 1.27, 14, 0]) _microbit_pin(); + } + color("Grey") for (x=[-2:2]) for (y=[-2:2]) { + translate([x * 4 - 0.5, y * 4, 0.5]) cube([1, 2.25, 1]); + } + translate([10, -18, 0]) _microbit_button(); + translate([-3.5, -22.5, -1.75]) color("Silver") cube([7, 5.5, 2]); + translate([15, -21, -4]) color("Ivory") cube([8, 5.5, 4.25]); + translate([21, 0, 1]) rotate([0, 180, 0]) _microbit_button(); + translate([-21, 0, 1]) rotate([0, 180, 0]) _microbit_button(); +} + +microbit();
