Skip to content

Commit cf0425c

Browse files
committed
Added astrophotography tracker code
1 parent 284171e commit cf0425c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Astrophotography_Tracker/code.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import time
2+
import board
3+
import digitalio
4+
5+
step = digitalio.DigitalInOut(board.D6)
6+
direct = digitalio.DigitalInOut(board.D5)
7+
8+
step.direction = digitalio.Direction.OUTPUT
9+
direct.direction = digitalio.Direction.OUTPUT
10+
11+
direct.value = True
12+
13+
while True:
14+
step.value = True
15+
time.sleep(0.001)
16+
step.value = False
17+
time.sleep(0.10025)

Astrophotography_Tracker/step_time.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
worm_ratio = 40 / 1
2+
belt_ratio = 100 / 60
3+
4+
steps = 200
5+
microsteps = 64
6+
7+
time = 1 / (((worm_ratio * belt_ratio) * steps * microsteps) / 86400)
8+
print(f"One step every: {time} seconds")
9+
print(f"Delay should be: {time-.001} seconds")

0 commit comments

Comments
 (0)