电机驱动SimpleFOC的调试界面SimpleFOCStudio的安装制作
电机驱动SimpleFOC的调试界面软件SimpleFOCStudio是个开源的Python工具,目前不支持最新版本的Python 3.11, 需要低版本的3.9才能顺利安装,为方便不熟悉Python的小伙伴使用,特制作了一个安装包,直接解压或者安装即可使用。
下载地址:
https://gitee.com/thomasyuangq/simple-focstudio-installer

安装包使用Pyinstaller制作:
pyinstaller -w simpleFOCStudio.py --add-data “.\src\gui\resources\.;.\src\gui\resources”
需要使用–add-data 参数将软件的工具条图标添加到安装包中。
EXE版本的安装程序用inno setup工具打包。

手工安装方法:
下载Python 3.9版本
运行:
pip install -r "requirements.txt"
python simpleFOCStudio.py
使用SimpleFOCStudio,需要在代码中加入下面这些指令:
#include <SimpleFOC.h>
....
// include commander interface
Commander command = Commander(Serial);
void doMotor(char* cmd) { command.motor(&motor, cmd); }
void setup(){
....
// add the motor to the commander interface
// The letter (here 'M') you will provide to the SimpleFOCStudio
command.add('M',doMotor,'motor');
// tell the motor to use the monitoring
motor.useMonitoring(Serial);
motor.monitor_downsample = 0; // disable monitor at first - optional
...
}
void loop(){
....
....
// real-time monitoring calls
motor.monitor();
// real-time commander calls
command.run();
}
软件界面如下:
