diff --git a/kamera_server.py b/kamera_server.py index cebe912..9f8378f 100644 --- a/kamera_server.py +++ b/kamera_server.py @@ -84,8 +84,10 @@ def action(changePin, action): @kamera_server.route("/position//") def motor_test(motor, position): if motor == "drehen": - #m1.stop() - #m1.start() + m1.stop() + time.sleep(1) + m1.start() + time.sleep(1) m1.gehe_zu(int(position)) return 'Drehen: ' + str(m1.pos) @@ -93,6 +95,3 @@ def motor_test(motor, position): #if __name__ == "__main__": # kamera_server.run(host='0.0.0.0') application = kamera_server - -try: - while True: \ No newline at end of file diff --git a/src/schrittmotor.py b/src/schrittmotor.py index bb8becf..db10c84 100644 --- a/src/schrittmotor.py +++ b/src/schrittmotor.py @@ -87,7 +87,7 @@ class motor(): einzelschritt(self.pwm4, 1, ges_schritte, temp_pos + 6, temp_t1, temp_t2) einzelschritt(self.pwm3, 0, ges_schritte, temp_pos + 7, temp_t1, temp_t2) - print(str(self.pos)) + #print(str(self.pos)) if self.halten == 1: self.pwm4.ChangeFrequency(self.freq_halten) @@ -126,7 +126,7 @@ class motor(): einzelschritt(self.pwm4, 1, ges_schritte, temp_pos + 6, temp_t1, temp_t2) einzelschritt(self.pwm1, 0, ges_schritte, temp_pos + 7, temp_t1, temp_t2) - print(str(self.pos)) + #print(str(self.pos)) if self.halten == 1: self.pwm4.ChangeFrequency(self.freq_halten)