1

This is my first time using Arduino IDE, and this is my code: I am trying to use the SendDemo sketch from RCSwitch on my NodeMCU board (ESP-12E), with the following configuration,

  1. Select; Tools -> Board: -> (Select the board of your choice). 'Generic ESP8266 Module'
  2. Select; Tools -> Flash Mode: -> 'DIO'
  3. Select; Tools -> Flash Frequency: -> '40MHz'
  4. Select; Tools -> CPU Frequency: -> '80 MHz'
  5. Select; Tools -> Flash Size: -> '512K (64K SPIFFS)'
  6. Select; Tools -> Debug Port: -> 'Disabled'
  7. Select; Tools -> Debug Level: -> 'None'
  8. Select; Tools -> Reset Method: -> 'ck'
  9. Select; Tools -> Upload Speed: -> '115200'

I keep receiving the error, 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). What should I do?

 /*
  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);
}
Jayman
  • 17
  • 5

1 Answers1

0

When I last updated ESP8266 board, that throw and error and I begin having this error: "arduino xtensa-lx106-elf-g++: fatal error: cannot execute 'cc1plus': CreateProcess: No such file or directory"

I fixed it downgrading ESP8266 board's to and earlier version and installing (not updating) to the latest version.

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34389750) – user16217248 May 20 '23 at 23:14