I am trying to compile and load the "RCSwitch : ReceiveDemo_Advanced". When compiled, it comes up with an error message Output was not declared in this scope. There is an "output.ino" file found in the GitHub where I downloaded the RCSwitch : ReceiveDemo_Advanced sketch from.

However, I am unaware of how to link these two together. Can anyone please help?

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  mySwitch.enableReceive(0);  // Receiver on interrupt 0 => that is pin #2

void loop() {
  if (mySwitch.available()) {
    output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());


  • Can you link to that output.ino?
    – Sim Son
    Dec 25 '20 at 1:13
  • 2
    put output.ino next to ReceiveDemo_Advanced.ino in the ReceiveDemo_Advanced folder
    – Juraj
    Dec 25 '20 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.