|
8266 1s 带继电器模块 已经安装了json库
还是编译错误
Arduino:1.8.18 (Windows 7), 开发板:"Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
Hello_WiFi:151:24: error: missing terminating " character
151 | payload += "{"ssid":"";
| ^~
Hello_WiFi:159:17: error: missing terminating " character
159 | payload += ""}";
| ^~
C:\Users\ADMINI~1\AppData\Local\Temp\arduino_modified_sketch_270399\Hello_WiFi.ino: In function 'void handleConnect()':
Hello_WiFi:151:21: error: unable to find string literal operator 'operator""ssid' with 'const char [3]', 'unsigned int' arguments
151 | payload += "{"ssid":"";
| ^~~
Hello_WiFi:153:27: error: expected ';' before ':' token
153 | payload += "","password":"";
| ^
| ;
Hello_WiFi:155:28: error: expected ';' before ':' token
155 | payload += "","location0":"";
| ^
| ;
Hello_WiFi:157:26: error: expected ';' before ':' token
157 | payload += "","apikey0":"";
| ^
| ;
Hello_WiFi:159:16: error: expected ';' before '}' token
159 | payload += ""}";
| ^
| ;
C:\Users\ADMINI~1\AppData\Local\Temp\arduino_modified_sketch_270399\Hello_WiFi.ino: At global scope:
Hello_WiFi:161:3: error: 'wifiConfig' does not name a type
161 | wifiConfig.println(payload);//将数据写入config.json文件中
| ^~~~~~~~~~
Hello_WiFi:162:3: error: 'Serial' does not name a type
162 | Serial.println("配置文件写入成功!");
| ^~~~~~
Hello_WiFi:163:3: error: 'wifiConfig' does not name a type
163 | wifiConfig.close();
| ^~~~~~~~~~
Hello_WiFi:164:1: error: expected declaration before '}' token
164 | }
| ^
exit status 1
missing terminating " character
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
|
|