Initial commit
This commit is contained in:
27
BM/main.py
Normal file
27
BM/main.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from smart_motor import SmartMotor
|
||||
import time
|
||||
|
||||
tmc = SmartMotor()
|
||||
|
||||
print("########")
|
||||
|
||||
|
||||
#tmc.driver_status()
|
||||
#tmc.general_config()
|
||||
|
||||
print("########")
|
||||
|
||||
#tmc.init_encoder()
|
||||
|
||||
#tmc.rotate(5,degrees=18000,acceleration=1000,deceleration=1000)
|
||||
print("begin1",tmc.get_microstepping_resolution());
|
||||
time.sleep(2)
|
||||
tmc.set_microstepping_resolution(256)
|
||||
time.sleep(2)
|
||||
|
||||
print("begin",tmc.get_microstepping_resolution());
|
||||
|
||||
#print("encoder : ")
|
||||
#print(tmc.get_encoder_position(0))
|
||||
|
||||
#0x55 0x00 0x6C 0x4D
|
||||
Reference in New Issue
Block a user