Skip to content

Commit a645ee7

Browse files
committed
Modified power module
1 parent 774918d commit a645ee7

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

arduino.scad

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121
//
2222

23+
//arduino("Mega");
2324

2425
//Constructs a roughed out arduino board
2526
//Current only USB and power on the board but will add headers later
@@ -97,8 +98,7 @@ module boardShape( boardType = "Uno", offset = 0, height = boardHeight ) {
9798
polygon(points = dueBoardPath);
9899
} else {
99100
echo("Board type not found!");
100-
}
101-
101+
}
102102
}
103103

104104
//This is used for placing the mounting holes
@@ -151,9 +151,23 @@ module usb( boardType = "Uno", extend = 0, offset = 0 ) {
151151
}
152152

153153
//similar to usb function but for the power jack
154-
module power( boardType = "Uno", extend = 0, offset = 0 ) {
155-
translate([41.14 - offset,-(1.8 + extend), boardHeight - offset])
156-
cube([9 + offset * 2, 13.2 + extend, 10.9 + offset * 2]);
154+
module power( boardType = "Uno", extend = 0, offset = 0, circleCut = false ) {
155+
width = 9;
156+
height = 10.9;
157+
radius = 6.33 / 2;
158+
distanceFromTop = 1.36;
159+
if( !circleCut ) {
160+
translate([41.14, 0, boardHeight]) { // difference() {
161+
translate([-offset, -(1.8 + extend), -offset])
162+
cube([width + offset * 2, 13.2 + extend, height + offset * 2]);
163+
// translate([ width / 2, 5, 10.9 - radius - distanceFromTop]) rotate( [90, 0, 0])
164+
// cylinder( r = radius, h = 20, $fn = 32 );
165+
}
166+
} else {
167+
translate([ 41.14 + width / 2, 0, boardHeight + height - radius - distanceFromTop])
168+
rotate( [90, 0, 0])
169+
cylinder( r = radius + offset, h = extend, $fn = 64 );
170+
}
157171
}
158172

159173
module headers( boardType = "Uno", extend = 0, offset = 0 ) {

0 commit comments

Comments
 (0)