arduino - 如何修复 xtensa-lx106-elf-g++:错误:Arduino IDE 上无法识别的命令行选项“-std=gnu++17”错误
问题描述
这是我第一次使用 Arduino IDE,这是我的代码:我正在尝试在我的 NodeMCU 板(ESP-12E)上使用来自 RCSwitch 的 SendDemo 草图,配置如下,
- 选择; 工具->板:->(选择您选择的板)。'通用 ESP8266 模块'
- 选择; 工具 -> Flash 模式: -> 'DIO'
- 选择; 工具 -> 闪光频率: -> '40MHz'
- 选择; 工具 -> CPU 频率: -> '80 MHz'
- 选择; 工具 -> 闪存大小: -> '512K (64K SPIFFS)'
- 选择; 工具 -> 调试端口: -> '禁用'
- 选择; 工具->调试级别:->“无”
- 选择; 工具 -> 重置方法: -> 'ck'
- 选择; 工具 -> 上传速度: -> '115200'
我一直收到错误,xtensa-lx106-elf-g++: error: unrecognized command line option '-std=gnu++17' exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).
我该怎么办?
/*
Example for different sending methods
https://github.com/sui77/rc-switch/
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
// Transmitter is connected to Arduino Pin #10
mySwitch.enableTransmit(10);
// Optional set protocol (default is 1, will work for most outlets)
// mySwitch.setProtocol(2);
// Optional set pulse length.
// mySwitch.setPulseLength(320);
// Optional set number of transmission repetitions.
// mySwitch.setRepeatTransmit(15);
}
void loop() {
/* See Example: TypeA_WithDIPSwitches */
mySwitch.switchOn("11111", "00010");
delay(1000);
mySwitch.switchOff("11111", "00010");
delay(1000);
/* Same switch as above, but using decimal code */
mySwitch.send(5393, 24);
delay(1000);
mySwitch.send(5396, 24);
delay(1000);
/* Same switch as above, but using binary code */
mySwitch.send("010100010001010100110011");
delay(1000);
mySwitch.send("010100010001010100110011");
delay(1000);
/* Same switch as above, but tri-state code */
mySwitch.sendTriState("00000FFF0F0F");
delay(1000);
mySwitch.sendTriState("00000FFF0FF0");
delay(1000);
delay(20000);
}
解决方案
推荐阅读
- javascript - 将 react-js Material-tables headerStyle 列转换为行
- css - 在剪贴蒙版内悬停时从灰度更改为彩色
- php - PHP - 如何访问函数外部的变量
- haskell - 我应该使用 ReaderT 在 Servant 中传递数据库连接池吗?
- javascript - 使用 Vue JS 库开发自定义模态时面临的问题
- php - 在 PHP 中使用 foreach 循环成功插入和邮寄后重定向
- ios - swift - Mapkit 在 if else 语句中更改 pinTintColor
- wpf - 应用于多个元素的相同混合行为的问题
- node.js - NodeJs >Express > AWS > S3 > 对对象进行空 res.send() 测试可能是 Promise 延迟
- firebase - Firebase Cloud Function 单元测试 HTTP onCall