LSatan / SmartRC-CC1101-Driver-Lib

This driver library can be used for many libraries that use a simple RF ASK module, with the advantages of the cc1101 module. It offers many direct setting options as in SmartRF Studio and calculates settings such as MHz directly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not send via rcswitch

gerashk opened this issue · comments

`CC1101recivepin = 4; CC1101sendPin = 5;// for esp8266! Receiver on pin 4 = D2.

if (ELECHOUSE_cc1101.getCC1101()){ // Check the CC1101 Spi connection.
Serial.println("Connection OK ");
}else{
Serial.println("Connection Error");
//WebSerial.println("Connection Error");
}

//CC1101 Settings: (Settings with "//" are optional!)
ELECHOUSE_cc1101.Init(); // must be set to initialize the cc1101!
ELECHOUSE_cc1101.setMHZ(433.92); //The cc1101 can: 300-348 MHZ, 387-464MHZ and 779-928MHZ.
ELECHOUSE_cc1101.setModulation(2); // set modulation mode. 0 = 2-FSK, 1 = GFSK, 2 = ASK/OOK, 3 = 4-FSK, 4 = MSK.ELECHOUSE_cc1101.setModulation(0); // set modulation mode. 0 = 2-FSK, 1 = GFSK, 2 = ASK/OOK, 3 = 4-FSK, 4 = MSK.
mySwitch.enableTransmit(CC1101sendPin);
ELECHOUSE_cc1101.SetTx();
}

void loop() {

Serial.print("Send ");
Serial.println("3985, 12");
mySwitch.send(3985, 12);
delay(5000);

}`

I can’t understand why nothing is sent. everything works at the reception. The LED blinks when sending. but it doesn't send anything. I check with 2 devices