▲ 肩关节运动
▲ 肩关节角度
▲ 肘关节运动
▲ 肘关节角度变化
#!/usr/local/bin/python # -*- coding: gbk -*- #============================================================ # TEST1.PY -- by Dr. ZhuoQing 2020-08-18 # # Note: #============================================================ from headm import * from tsmodule.tsstm32 import * stm32cmd("CLEAR") stm32cmd('step2 -1000') time.sleep(0.01) stm32cmd('showa2 400') time.sleep(6) val = stm32memo(1) angle = val[0:-1] costtime = val[-1] timedim = linspace(0, costtime/1000, len(angle), endpoint=True) tspsavenew('measure2', t=timedim, angle=angle) plt.plot(timedim, angle) plt.xlabel("Time(s)") plt.ylabel("Angle") plt.grid(True) plt.tight_layout() plt.show() #------------------------------------------------------------ # END OF FILE : TEST1.PY #============================================================