added python api
This commit is contained in:
parent
a9020e6020
commit
629f8bbf64
5 changed files with 434 additions and 0 deletions
18
software/PythonAPI/usage_example.py
Normal file
18
software/PythonAPI/usage_example.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from open_micro_stage_api import OpenMicroStageInterface
|
||||
|
||||
# create interface and connect
|
||||
oms = OpenMicroStageInterface(show_communication=True, show_log_messages=True)
|
||||
oms.connect('/dev/ttyACM0')
|
||||
|
||||
# run this once to calibrate joints
|
||||
# for i in range(3): oms.calibrate_joint(i, save_result=True)
|
||||
|
||||
# home device
|
||||
oms.home()
|
||||
|
||||
# move and wait
|
||||
oms.move_to(0, 0, 0, f=10)
|
||||
oms.wait_for_stop()
|
||||
|
||||
# print some info
|
||||
oms.read_device_state_info()
|
||||
Loading…
Add table
Add a link
Reference in a new issue