dparson55 / NRFLite

nRF24L01+ library with AVR 2 pin support, requiring very little code along with YouTube videos showing all available features.
MIT License
160 stars 26 forks source link

(NRF24L01+) ("NRFLite.h") (SplitDataAcrossMultiplePackets_RX) read register 0x09 directly(RPD) #85

Closed gordon4liu closed 6 months ago

gordon4liu commented 6 months ago

Hi, Bracuse "NRFLite.h: don't supply the RPD (Rx power detect), I want to read the register 0x09 directly. Serial.println(_radio.readRegister(0x09)); // I only insert the code of but it's not work. Could you give ne any suggestion to resolve the issue??

===my code=== void loop() { while (_radio.hasData()) { // Serial.println(_radio.readRegister(CD)); Serial.println(_radio.readRegister(0x09));

    RadioPacket packet;
    _radio.readData(&packet);

    if (packet.PacketNumber == 0)
    {

. .

===Target== RPD function === bool goodSignal = radio.testRPD(); if(radio.available()){ Serial.println(goodSignal ? "Strong signal > 64dBm : "Weak signal < 64dBm"); radio.read(0,0);

dparson55 commented 6 months ago

You can use scanChannel to measure the strength of signals on a channel. The ChannelScanner example shows its usage.

I made readRegister and many other functions private to keep the library as simple to use as possible. If you ever want to change this though, you can fork this repo and customize the library as you see fit.

dparson55 commented 6 months ago

Closing due to lack of response.