Expected primary-expression before 'void' 433 mhz

könnt ihr mir helfen ich weiss nicht mehr weiter finde den fehler einfach nicht

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch

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

void loop() {
if (mySwitch.available()) {

Serial.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print(" / ");
Serial.print( mySwitch.getReceivedBitlength() );
Serial.print("bit ");
Serial.print("Protocol: ");
Serial.println( mySwitch.getReceivedProtocol() );

mySwitch.resetAvailable();

}
}

danke schon mal im vorraus

Vielleicht:
RCSwitch mySwitch = RCSwitch;

Oder nur:
RCSwitch mySwitch;

DATEI - BEISPIELE - rc-switch - ReceiveDemo_Simple:

RCSwitch mySwitch = RCSwitch();

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.