aardio 调用arduino_debug编译arduino下载arduino开发板
By
cuiqbo
at 2021-08-06 • 0人收藏 • 792人看过
import win.ui; import process; /*DSG{{*/ var winform = win.form(text="aardio form";right=759;bottom=469) winform.add( button={cls="button";text="编译";left=40;top=237;right=200;bottom=296;z=1}; button2={cls="button";text="下载";left=263;top=237;right=423;bottom=296;z=2}; button3={cls="button";text="Button";left=492;top=246;right=631;bottom=294;z=3} ) /*}}*/ io.open() var arduino_path ="F:\软件\arduino-1.8.1-windows\arduino-1.8.1\arduino_debug.exe";//定义arduino 路径 var verify = "--verify F:\软件\arduino-1.8.1-windows\arduino-1.8.1\examples\01.Basics\AnalogReadSerial\AnalogReadSerial.ino";//编译文件 var upload = "--upload " + "G:\学习\电子\esp8266\arduino\Blink\Blink.ino";//编译并下载 var port = "--port COM8 "; //定义端口号 var board = "--board arduino:avr:nano:cpu=atmega328 ";//定义编译器,版型,cpu型号 var verb = "--verbose ";//与-v功能一样 winform.button.oncommand = function(id,event){ process(arduino,verify); } winform.button2.oncommand = function(id,event){ test =process(arduino, board + port + "-v " + upload ) } winform.show() win.loopMessage();
1 个回复 | 最后更新于 2021-08-07
登录后方可回帖
谢谢分享, 我帮你重新编辑了下, 发帖输入框这里有个 [代码语言] 选项, 里面选择aardio, 然后黏贴 , 就会以代码的形式展示了.