Skip to content

Commit 27febca

Browse files
committed
Moved calculations in step_time.py to code.py
1 parent cf0425c commit 27febca

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Astrophotography_Tracker/code.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
import board
33
import digitalio
44

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 * steps * microsteps) / 86400)
14+
515
step = digitalio.DigitalInOut(board.D6)
616
direct = digitalio.DigitalInOut(board.D5)
717

@@ -14,4 +24,4 @@
1424
step.value = True
1525
time.sleep(0.001)
1626
step.value = False
17-
time.sleep(0.10025)
27+
time.sleep(wait - 0.001)

Astrophotography_Tracker/step_time.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)