From 6c1cc9c5add4341c19784ba54188d7ca1fa20e96 Mon Sep 17 00:00:00 2001 From: Thomas Lindner Date: Mon, 23 Dec 2024 01:43:51 +0100 Subject: [PATCH] no pause, just wait --- freude.py | 5 ++--- freude.txt | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/freude.py b/freude.py index 82b6a02..c8bfece 100644 --- a/freude.py +++ b/freude.py @@ -3,7 +3,7 @@ import csv # actually an arbitrary scaling factor steps_per_mm = 5 # 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 # duration of 1/8th base_duration = 60 / bpm / 8 @@ -21,5 +21,4 @@ with open("FREUDE.gcode", "w") as f: length = int(duration) * base_duration / 60 * feedrate position += -length if position > 100 else length 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 ; wait\n") + f.write("G4\n") diff --git a/freude.txt b/freude.txt index 46d5f0e..a678d5d 100644 --- a/freude.txt +++ b/freude.txt @@ -44,8 +44,8 @@ 2,2 0,2 2,2 --5,2 -4,4 +-5,4 +4,2 4,2 5,2 7,2