motor test
This commit is contained in:
@ -137,6 +137,14 @@ class motor():
|
||||
self.rueckwaerts(self.schritte_max, 1)
|
||||
self.pos = 0
|
||||
|
||||
def gehe_zu(self, position):
|
||||
temp_schritte = int(position) - self.pos
|
||||
|
||||
if temp_schritte > 0:
|
||||
self.vorwaerts(temp_schritte)
|
||||
else:
|
||||
self.rueckwaerts(temp_schritte)
|
||||
|
||||
def einzelschritt(spule, status, ges_schritte, schritt, t1, t2):
|
||||
w = (schritt * 100 / (ges_schritte - 1)) * 1.8
|
||||
s = round(math.sin(math.radians(w)), 2)
|
||||
|
Reference in New Issue
Block a user