no pause, just wait
This commit is contained in:
parent
84999e277e
commit
6c1cc9c5ad
|
|
@ -3,7 +3,7 @@ import csv
|
||||||
# actually an arbitrary scaling factor
|
# actually an arbitrary scaling factor
|
||||||
steps_per_mm = 5
|
steps_per_mm = 5
|
||||||
# starting from C3 = 130.81 Hz
|
# starting from C3 = 130.81 Hz
|
||||||
frequencies = [2**(i/12) * 130.81 for i in range(24)]
|
frequencies = [2 ** (i / 12) * 130.81 for i in range(24)]
|
||||||
bpm = 60
|
bpm = 60
|
||||||
# duration of 1/8th
|
# duration of 1/8th
|
||||||
base_duration = 60 / bpm / 8
|
base_duration = 60 / bpm / 8
|
||||||
|
|
@ -21,5 +21,4 @@ with open("FREUDE.gcode", "w") as f:
|
||||||
length = int(duration) * base_duration / 60 * feedrate
|
length = int(duration) * base_duration / 60 * feedrate
|
||||||
position += -length if position > 100 else length
|
position += -length if position > 100 else length
|
||||||
f.write(f"G0 X{position:.6f} Y{position:.6f} F{feedrate} \n")
|
f.write(f"G0 X{position:.6f} Y{position:.6f} F{feedrate} \n")
|
||||||
f.write(f"G4 P{int(int(duration) * base_duration * 50)} ; wait a bit\n")
|
f.write("G4\n")
|
||||||
f.write("G4 ; wait\n")
|
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@
|
||||||
2,2
|
2,2
|
||||||
0,2
|
0,2
|
||||||
2,2
|
2,2
|
||||||
-5,2
|
-5,4
|
||||||
4,4
|
4,2
|
||||||
4,2
|
4,2
|
||||||
5,2
|
5,2
|
||||||
7,2
|
7,2
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue