LowPowerLab / RFM69

RFM69 library for RFM69W, RFM69HW, RFM69CW, RFM69HCW (semtech SX1231, SX1231H)
GNU General Public License v3.0
778 stars 381 forks source link

RP2040 #175

Closed charles-d-burton closed 2 years ago

charles-d-burton commented 2 years ago

This is mostly looking for information. I'm wondering if the RP2040 chip is compatible with this library. I'm attempting to use it but never seem to get any RSSI back from the chip, I'm setting it up this way

// LowPowerLabs RFM69 Library
#include <RFM69.h>
// SPI Library
#include <SPI.h>
// Addresses for this node. CHANGE THESE FOR EACH NODE!

#define NETWORKID     0   // Must be the same for all nodes
#define MYNODEID      2   // My node ID
#define TONODEID      1   // Destination node ID

#define FREQUENCY     RF69_915MHZ

// AES encryption (or not):

#define ENCRYPT       true // Set to "true" to use encryption
#define ENCRYPTKEY    "passwordpassword" // Use the same 16-byte key on all nodes

// Use ACKnowledge when sending messages (or not):

#define USEACK        true // Request ACKs or not

// Create a library object for our RFM69HCW module:

RFM69 radio;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
   // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  Serial.print("Node ");
  Serial.print(MYNODEID,DEC);
  Serial.println(" ready");
  SPI.setTX(19);
  SPI.setRX(16);
  SPI.setSCK(18);
  SPI.setCS(17);
  pinMode(21, INPUT);
  radio.setIrq(21);
  // Initialize the RFM69HCW:
  radio.initialize(FREQUENCY, MYNODEID, NETWORKID);
  radio.setHighPower(); // Always use this for RFM69HCW

  // Turn on encryption if desired:

  if (ENCRYPT) {
    radio.encrypt(ENCRYPTKEY);
  }

  delay(1000);

}

When I enter the loop and use radio.RSSI I only ever get back that it's 0. I started perusing the code for this library and I'm not sure that it will work with the RP2040 just yet but I'm admittedly pretty new to this space.

LowPowerLab commented 2 years ago

This library was never developed or tested for the RP2040. I will close this issue now, if you manage to get it working please submit a PR.