新手上路不知道哪错了请各位指教帮帮我,自己琢磨两天了
本帖最后由 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();
}
感觉是整个编译环境都没搭好 #include <dummy.h>
你这个头文件加上去干嘛 都能编译了,把BIN导出来自己烧得了 我买的ESP8266 12f弄了两天了,点灯APP还是离线的 我编译成功了,esp01s,好像是编译环境的问题。python3,和java 辣子皮 发表于 2020-2-24 22:24
我买的ESP8266 12f弄了两天了,点灯APP还是离线的
看串口里面,是不是链接上网络了,是不是密钥是对的, 随缘7906 发表于 2020-2-25 16:28
看串口里面,是不是链接上网络了,是不是密钥是对的,
密钥是复制粘贴的, 辣子皮 发表于 2020-2-27 23:57
密钥是复制粘贴的,
关键看串口输出是不是链接上网络了,路由器里面有没有设备 我编译成功了,更新一下开发版管理器的esp8266
页:
[1]
2