Added Makefile. Now builds. DOS->UNIX
This commit is contained in:
parent
de681b31bc
commit
24ba7eab98
8
code/Makefile
Normal file
8
code/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
all:
|
||||
make build
|
||||
make program
|
||||
build:
|
||||
avr-gcc main.c i2c_master.c -o counter -mmcu=attiny85
|
||||
|
||||
program:
|
||||
avrdude
|
||||
1698
code/main.c
1698
code/main.c
File diff suppressed because it is too large
Load Diff
@ -1,37 +1,37 @@
|
||||
thickness = 5;
|
||||
hole_rad = 5;
|
||||
spool_rad = 150;
|
||||
square_size = spool_rad + hole_rad * 4;
|
||||
triangle_rad = square_size * 2 / 3;
|
||||
filament_width = 10;
|
||||
filament_height = 20;
|
||||
filament_offset = 2;
|
||||
// -1 = Left; 1 = Right
|
||||
side = -1;
|
||||
|
||||
difference()
|
||||
{
|
||||
// Base Shape
|
||||
union()
|
||||
{
|
||||
translate([square_size / 2 * side, 0, 0])
|
||||
cube([square_size, square_size, thickness], center = true);
|
||||
|
||||
translate([0, -square_size / 6, 0])
|
||||
rotate([0, 0, -30])
|
||||
cylinder(thickness, triangle_rad, triangle_rad, $fn = 3, center = true);
|
||||
}
|
||||
|
||||
// Holes
|
||||
for (i = [0:1:2])
|
||||
{
|
||||
translate([0, -square_size / 6, 0])
|
||||
rotate(-30 + i*120)
|
||||
translate([triangle_rad - hole_rad * 3, 0, 0])
|
||||
cylinder(thickness + 2, hole_rad, hole_rad, $fn = 360, center = true);
|
||||
}
|
||||
|
||||
// Filament Sensor
|
||||
translate([square_size * side - side * (filament_width / 2 + filament_offset), square_size / 2 - filament_height / 2, thickness / 2])
|
||||
cube([filament_width, filament_height, thickness], center = true);
|
||||
}
|
||||
thickness = 5;
|
||||
hole_rad = 5;
|
||||
spool_rad = 150;
|
||||
square_size = spool_rad + hole_rad * 4;
|
||||
triangle_rad = square_size * 2 / 3;
|
||||
filament_width = 10;
|
||||
filament_height = 20;
|
||||
filament_offset = 2;
|
||||
// -1 = Left; 1 = Right
|
||||
side = -1;
|
||||
|
||||
difference()
|
||||
{
|
||||
// Base Shape
|
||||
union()
|
||||
{
|
||||
translate([square_size / 2 * side, 0, 0])
|
||||
cube([square_size, square_size, thickness], center = true);
|
||||
|
||||
translate([0, -square_size / 6, 0])
|
||||
rotate([0, 0, -30])
|
||||
cylinder(thickness, triangle_rad, triangle_rad, $fn = 3, center = true);
|
||||
}
|
||||
|
||||
// Holes
|
||||
for (i = [0:1:2])
|
||||
{
|
||||
translate([0, -square_size / 6, 0])
|
||||
rotate(-30 + i*120)
|
||||
translate([triangle_rad - hole_rad * 3, 0, 0])
|
||||
cylinder(thickness + 2, hole_rad, hole_rad, $fn = 360, center = true);
|
||||
}
|
||||
|
||||
// Filament Sensor
|
||||
translate([square_size * side - side * (filament_width / 2 + filament_offset), square_size / 2 - filament_height / 2, thickness / 2])
|
||||
cube([filament_width, filament_height, thickness], center = true);
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
difference()
|
||||
{
|
||||
cylinder(5, 11, 11, $fn=360, center = true);
|
||||
translate([0, 0, 1.5])
|
||||
cylinder(5, 10.5, 10.5, $fn=360, center = true);
|
||||
}
|
||||
difference()
|
||||
{
|
||||
cylinder(5, 11, 11, $fn=360, center = true);
|
||||
translate([0, 0, 1.5])
|
||||
cylinder(5, 10.5, 10.5, $fn=360, center = true);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user