added hardware board software and PC control guide
This commit is contained in:
18
Software/sTimer.py
Normal file
18
Software/sTimer.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from machine import Timer
|
||||
import TMC2130
|
||||
|
||||
FREQUENCY = 100 #kHz
|
||||
|
||||
counter = 0
|
||||
sTim = Timer()
|
||||
|
||||
def sTim_callback(t):
|
||||
global counter
|
||||
counter += 1
|
||||
TMC2130.timer_callback(counter)
|
||||
|
||||
def sTimer_Start():
|
||||
sTim.init(freq=FREQUENCY*1000, mode=Timer.PERIODIC, callback=sTim_callback)
|
||||
|
||||
def sTimer_Stop():
|
||||
sTim.deinit()
|
||||
Reference in New Issue
Block a user