电机驱动SimpleFOC的调试界面SimpleFOCStudio的安装制作

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

new_gif.gif

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

EXE版本的安装程序用inno setup工具打包。


formview.png

手工安装方法:

下载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();
}

软件界面如下:


treeview.png
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容