diff --git a/examples/SX1231/SX1231_Receive/SX1231_Receive.ino b/examples/SX1231/SX1231_Receive/SX1231_Receive.ino index 8de99947..727de1e5 100644 --- a/examples/SX1231/SX1231_Receive/SX1231_Receive.ino +++ b/examples/SX1231/SX1231_Receive/SX1231_Receive.ino @@ -15,9 +15,9 @@ #include // SX1231 has the following connections: -// NSS pin: 10 +// CS pin: 10 // DIO0 pin: 2 -// DIO1 pin: 3 +// RESET pin: 3 SX1231 rf = new Module(10, 2, 3); // or using RadioShield @@ -35,7 +35,7 @@ void setup() { // frequency deviation: 50.0 kHz // output power: 13 dBm // sync word: 0x2D01 - byte state = rf.begin(); + int state = rf.begin(); if (state == ERR_NONE) { Serial.println(F("success!")); } else { diff --git a/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino b/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino index b3376f2d..c781b02a 100644 --- a/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino +++ b/examples/SX1231/SX1231_Transmit/SX1231_Transmit.ino @@ -15,9 +15,9 @@ #include // SX1231 has the following connections: -// NSS pin: 10 +// CS pin: 10 // DIO0 pin: 2 -// DIO1 pin: 3 +// RESET pin: 3 SX1231 rf = new Module(10, 2, 3); // or using RadioShield diff --git a/src/modules/SX1231/SX1231.cpp b/src/modules/SX1231/SX1231.cpp index 7e1e93d4..e4cff588 100644 --- a/src/modules/SX1231/SX1231.cpp +++ b/src/modules/SX1231/SX1231.cpp @@ -6,7 +6,9 @@ SX1231::SX1231(Module* mod) : RF69(mod) { int16_t SX1231::begin(float freq, float br, float rxBw, float freqDev, int8_t power) { // set module properties - _mod->init(RADIOLIB_USE_SPI, RADIOLIB_INT_BOTH); + _mod->init(RADIOLIB_USE_SPI); + Module::pinMode(_mod->getIrq(), INPUT); + Module::pinMode(_mod->getRst(), OUTPUT); // try to find the SX1231 chip uint8_t i = 0;