added python api

This commit is contained in:
0x23 2025-09-19 10:01:23 +02:00
parent a9020e6020
commit 629f8bbf64
5 changed files with 434 additions and 0 deletions

View 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()