|
本帖最后由 duowan1990 于 2020-2-21 22:52 编辑
错误如下:
Executable segment sizes:
IROM : 495976 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 28024 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1404 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 5500 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 30128 ) - zeroed variables (global, static) in RAM/HEAP
项目使用了 530904 字节,占用了 (55%) 程序存储空间。最大为 958448 字节。
全局变量使用了37032字节,(45%)的动态内存,余留44888字节局部变量。最大为81920字节。
java.io.IOException: Cannot run program "{runtime.tools.python3.path}/python3": CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2047)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:444)
at java.lang.ProcessImpl.start(ProcessImpl.java:139)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 9 more
上传项目出错
这是别人那里抄的。
- #include <dummy.h>
- #define BLINKER_WIFI
- #define BLINKER_MIOT_OUTLET
- #include <Blinker.h>
- char auth[] = "7777777777";
- char ssid[] = "7777777777";
- char pswd[] = "777777777";
- BlinkerButton Button1("btn-kai");
- BlinkerButton Button2("btn-guan");
- BlinkerButton Button3("btn-aaa");
- bool oState = false;
- int counter = 0;
- void miotPowerState(const String & state)
- {
- BLINKER_LOG("need set power state: ", state);
- if (state == BLINKER_CMD_ON) {
- digitalWrite(0, LOW);
- BlinkerMIOT.powerState("on");
- BlinkerMIOT.print();
- oState = true;
- }
- else if (state == BLINKER_CMD_OFF) {
- digitalWrite(0,HIGH);
- BlinkerMIOT.powerState("off");
- BlinkerMIOT.print();
- oState = false;
- }
- }
- void miotQuery(int32_t queryCode)
- {
- BLINKER_LOG("MIOT Query codes: ", queryCode);
- switch (queryCode)
- {
- case BLINKER_CMD_QUERY_ALL_NUMBER :
- BLINKER_LOG("MIOT Query All");
- BlinkerMIOT.powerState(oState ? "on" : "off");
- BlinkerMIOT.print();
- break;
- case BLINKER_CMD_QUERY_POWERSTATE_NUMBER :
- BLINKER_LOG("MIOT Query Power State");
- BlinkerMIOT.powerState(oState ? "on" : "off");
- BlinkerMIOT.print();
- break;
- default :
- BlinkerMIOT.powerState(oState ? "on" : "off");
- BlinkerMIOT.print();
- break;
- }
- }
- void dataRead(const String & data)
- {
- BLINKER_LOG("Blinker readString: ", data);
- Blinker.vibrate();
- uint32_t BlinkerTime = millis();
- Blinker.print("millis", BlinkerTime);
- }
- void button1_callback(const String & state)
- {
- digitalWrite(0,LOW);
- BLINKER_LOG("get button state:on", state);
- }
- void button2_callback(const String & state)
- {
- digitalWrite(0,HIGH);
- BLINKER_LOG("get button state:off", state);
- }
- void button3_callback(const String & state)
- {
- BLINKER_LOG("get button state:on", state);
- Blinker.print(state);
- if(state=="on"){
- digitalWrite(0,LOW);
- // Button3.print("on");
- }else if(state =="off"){
- digitalWrite(0,HIGH);
- // Button3.print("off");
- }
- }
- void setup()
- {
- Serial.begin(115200);
- BLINKER_DEBUG.stream(Serial);
- pinMode(0, OUTPUT); //定义io口为输出
- digitalWrite(0, LOW); //定义io默认为高电平
- Blinker.begin(auth, ssid, pswd);
- Blinker.attachData(dataRead);
- BlinkerMIOT.attachPowerState(miotPowerState);
- BlinkerMIOT.attachQuery(miotQuery);
- Button1.attach(button1_callback);
- Button2.attach(button2_callback);
- Button3.attach(button3_callback);
- }
- void loop()
- {
- Blinker.run();
- }
复制代码
|
-
|