We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fce94d1 + 92e2236 commit 79786dcCopy full SHA for 79786dc
Astrophotography_Tracker/code.py
@@ -0,0 +1,27 @@
1
+import time
2
+import board
3
+import digitalio
4
+
5
+worm_ratio = 40/1
6
+belt_ratio = 100/60
7
+gear_ratio = worm_ratio * belt_ratio
8
9
+steps = 200 # Steps per revolution
10
+microsteps = 64 # Microstepping resolution
11
+total_steps = steps * microsteps # Total microsteps per revolution
12
13
+wait = 1/ ((gear_ratio * total_steps) / 86400)
14
15
+step = digitalio.DigitalInOut(board.D6)
16
+direct = digitalio.DigitalInOut(board.D5)
17
18
+step.direction = digitalio.Direction.OUTPUT
19
+direct.direction = digitalio.Direction.OUTPUT
20
21
+direct.value = True
22
23
+while True:
24
+ step.value = True
25
+ time.sleep(0.001)
26
+ step.value = False
27
+ time.sleep(wait - 0.001)
0 commit comments