I am uploading this code to arduino. The CODE is being printed but the data from the RF is not. I tested oled, it works fine. What should I do?`
#include <RCSwitch.h>
#include <OLED_I2C.h>
OLED myOLED(SDA, SCL, 8);
extern uint8_t SmallFont[];
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0);
myOLED.begin();
myOLED.setFont(SmallFont);
}
void loop() {
if (mySwitch.available()) {
long DATA = mySwitch.getReceivedValue();
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();
Serial.println(DATA);
myOLED.clrScr();
myOLED.print(DATA, LEFT, 24);
myOLED.print("CODE", CENTER, 16);
myOLED.update();
}
}