Arduino IDE 2 串口绘图仪(Serial Plotter) | 您所在的位置:网站首页 › 绘图仪线条不直需要怎么校准 › Arduino IDE 2 串口绘图仪(Serial Plotter) |
简介
Arduino IDE 2.x是基于Thiea IDE开发的, 支持 VS Code 扩展。 Arduino IDE 1.x绘图仪是直接打开串口接收,所以串口接收器和串口绘图仪无法同时打开。而在2.0以后使用了websocket通讯将数据发送给pollter,所以两个界面可以同时打开(架构如下),每启动一个IDE都会创建一个websocket服务器的端口。 源码地址 https://github.com/arduino/arduino-serial-plotter-webapp.git源码下载后可以通过以下命令运行 npm install npm test npm start npm buildhttp://localhost:3000 可以打开串口绘图仪 重启会减少查找到listening的端口号, 工具netstat -ano | findstr 进程号 在App.tsx文件中, wsport: parseInt(urlParans.get(“wsPort”) || “xxx”), xxx 端口号可以通过```netstat -ano | findstr Arduino进程号``找到并修改。 绘图仪显示通过chart.js一个图表库进行绘图显示,如果需要可以修改其设置,最多的需求是修改横轴的显示个数,具体在ChartPlotter.tsx文件中,修改dataPointThreshold值。
绘图仪模块的位置在安装目录下 resources\app\node_modules\arduino-serial-plotter-webapp\build\static\js\main.xxxx.chunk.js全局搜索 Object(o.useState)(50) ,这里的50指的是横坐标显示数值的个数 |
CopyRight 2018-2019 实验室设备网 版权所有 |