Bonjour dmlk
Si je suis dans ton cas, j'utilise un programme de monitoring qui me permet de voir si mon module radio est bien "vu" de l'Arduino:
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
//------------------------------------- Hardware configuration: Set up nRF24L01 radio on SPI bus plus pins 7 & 8
RF24 radio(9, 10); //Nano IO Shield https://wiki.iteadstudio.com/Arduino_Nano_IO_shield
//RF24 radio(7,8); // CE CS
//RF24 radio(9, 10); // Nano
//RF24 radio(9, 8); //ESP32 Rev1 M5stack
//------------------------------------- Topology
const uint64_t pipes[2] = { 0xABCDABCD71LL, 0x544d52687CLL }; // Radio pipe addresses for the 2 nodes to communicate.
void setup()
{
Serial.begin(115200);
printf_begin();
//----------------------------------- Setup and configure rf radio
radio.begin();
radio.setAutoAck(1); // Ensure autoACK is enabled
radio.enableAckPayload(); // Allow optional ack payloads
radio.setRetries(0,15); // Smallest time between retries, max no. of retries
radio.setPayloadSize(1); // Here we are sending 1-byte payloads to test the call-response speed
radio.openWritingPipe(pipes[1]); // Both radios listen on the same pipes by default, and switch when writing
radio.openReadingPipe(1,pipes[0]);
radio.startListening(); // Start listening
}
void loop(void)
{
Serial.println();
radio.printDetails(); // Dump the configuration of the rf unit for debugging
delay(2000);
}
Dans le moniteur à 115200, si le module n'est pas vu:
SPI Speedz = 10 Mhz
STATUS = 0x00 RX_DR=0 TX_DS=0 TX_DF=0 RX_PIPE=0 TX_FULL=0
RX_ADDR_P0-1 = 0x0000000000 0x0000000000
RX_ADDR_P2-5 = 0x00 0x00 0x00 0x00
TX_ADDR = 0x0000000000
RX_PW_P0-6 = 0x00 0x00 0x00 0x00 0x00 0x00
EN_AA = 0x00
EN_RXADDR = 0x00
RF_CH = 0x00
RF_SETUP = 0x00
CONFIG = 0x00
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = Disabled
PA Power = PA_MIN
ARC = 0
s'il est vu:
SPI Speedz = 10 Mhz
STATUS = 0x0e RX_DR=0 TX_DS=0 TX_DF=0 RX_PIPE=7 TX_FULL=0
RX_ADDR_P0-1 = 0x544d52687c 0xabcdabcd71
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0x544d52687c
RX_PW_P0-6 = 0x01 0x01 0x01 0x01 0x01 0x01
EN_AA = 0x3f
EN_RXADDR = 0x02
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x03 0x06
Data Rate = 1 MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_MAX
ARC = 0
Cordialement
jpbbricole