Arduino + nrf24 + cardiofrequenzimetro polar

Salve ragazzi,

per caso c'è qualcuno che ha un po di confidenza con il modulo nrf24l01?

sto facendo un piccolo progetto con Arduino alcuni sensori ed il cardiofrequenzimetro della polar Wind che come è spiegato bene in questo articolo è possibile leggere i valori del cardio direttamente da arduino con modulo nrf24

PolarWind

sono riuscito a far riconoscere il cardio al mio arduino collegato al modulo RF24 ma ora vorrei mandare il valore letto da arduino ad un altro arduino collegato a sua volta ad un altro modulo rf24 ma purtroppo ho un pò di problemi ad interpretare il codice usato per leggere i valori del cardio e quindi ritrasmettere il tutto

il codice che utilizzo io ed è anche quello utilizzato nell articolo è questo

#include <SPI.h>
#include "nRF24L01.h"

const int chipSelectNotPin = 53;
const int chipEnablePin = 9;
const int addressSize = 2;
const int packetLength = 28 - addressSize;
const int sensorPin =  2;      // the number of the LED pin

int pulseState = LOW;          // pulseState used to set off the sensor
long previousMillis = 0;       // will store last time pulse signal was changed

long pulseIntervalOn = 1;
long pulseIntervalOff = 1000;

void setup(){
  Serial.begin(115200);

  // initalize the  data ready and chip select pins:
  pinMode(chipEnablePin, OUTPUT);
  pinMode(chipSelectNotPin, OUTPUT);  
  pinMode(sensorPin, OUTPUT);

  // start the SPI library:
  SPI.setDataMode(SPI_MODE0);
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(SPI_2XCLOCK_MASK);
  SPI.begin();

  Serial.println("Configuring nRF...");
  // 1Mbps
  byte lv_rf_setup = 0x0;
  write_reg(RF_SETUP,&lv_rf_setup,1);
  
  //Freq channel
  byte lv_rf_ch = 73;
  write_reg(RF_CH, &lv_rf_ch, 1);
  
  //set address length
  byte lv_setup_aw = 0b00;
  switch (addressSize){
    case 2:
      lv_setup_aw = 0b00;
      break;
    case 3:
      lv_setup_aw = 0b01;
      break;
    case 4:
      lv_setup_aw = 0b10;
      break;
    case 5:
      lv_setup_aw = 0b11;
      break;
  }
  write_reg(SETUP_AW, &lv_setup_aw, 1);
  
  //Disable autoretransmit
  byte lv_setup_retr = 0x0;
  write_reg(SETUP_RETR, &lv_setup_retr, 1);
  
  //Disable Enchanced ShockBurst
  byte lv_en_aa = 0x0;
  write_reg(EN_AA, &lv_en_aa, 1);
  
  //Disable Pipe 1;
  byte lv_rx_pw_p1 = 0x0;
  write_reg(RX_PW_P1, &lv_rx_pw_p1, 1);
  
  //Set data length in pipe 0;
  byte lv_rx_pw_p0 = packetLength;
  write_reg(RX_PW_P0, &lv_rx_pw_p0, 1);
  
  //Set address
  byte lv_addr[5];
  lv_addr[1] = 0xC6;
  lv_addr[0] = 0xA1;
//  lv_addr[4] = 0xC6;
//  lv_addr[3] = 0xA1;
//  lv_addr[2] = 0x01;
//  lv_addr[1] = 0xF8;
//  lv_addr[0] = 0x11;
  write_reg(RX_ADDR_P0, &lv_addr[0], addressSize);
  
  //Flush RX buffer
  flush_rx();
  
  //Enable 16bit CRC and power up in RX mode
  byte lv_config = (1<<PWR_UP) | (1<<PRIM_RX) | (1<<EN_CRC) | (1<<CRCO);
  write_reg(CONFIG, &lv_config, 1);

  delay(50);
  
  //Enable nRF
  CE_HIGH();
  delay(10);
}

void loop(){
  byte nrf_status = get_nfr_status();
  if ((nrf_status & (1<<RX_DR)) != 0) {
    write_reg(STATUS, &nrf_status, (1<<RX_DR));

    //1. Read payload
    byte ff_status = read_reg(FIFO_STATUS);
    while (~ff_status & (1<<RX_EMPTY)){
      byte buf[packetLength];
      memset(buf,0,sizeof(buf)); 
      
      read_rx((byte*)(&buf),packetLength);
      
      //8th byte - current HR
      Serial.print("HR:"); 
      if (buf[5] < 100) Serial.print(" ");
      Serial.print(buf[7-addressSize], DEC);

      // Last byte - Avarage HR
      Serial.print("  AvgHR:"); 
      if (buf[packetLength-1] < 100) Serial.print(" ");
      Serial.print(buf[packetLength-1], DEC);
      
      //Raw packet
      Serial.print("    Raw data: "); 
      
      for (int i=0; i<packetLength; i++){
        if (buf[i] < 0x10) Serial.print("0");  
        Serial.print(buf[i], HEX);
        Serial.print(" ");
      }
      Serial.println();
      
      ff_status = read_reg(FIFO_STATUS);
    }
  }

  //Send pulse to trigger sensor 
  unsigned long currentMillis = millis();   
  if ((pulseState == LOW) && (currentMillis - previousMillis > pulseIntervalOff)) {
    previousMillis = currentMillis;   
    pulseState = HIGH;
    digitalWrite(sensorPin, pulseState);
  }
  if ((pulseState == HIGH) && (currentMillis - previousMillis > pulseIntervalOn)) {
    previousMillis = currentMillis;
    pulseState = LOW;
    digitalWrite(sensorPin, pulseState);
  }
}

byte read_reg(byte reg){
  byte lv_reg;
  CSN_LOW();
  SPI.transfer(R_REGISTER | (REGISTER_MASK & reg));
  lv_reg = SPI.transfer(NOP);
  CSN_HIGH(); 
  return lv_reg;
}

void write_reg(byte reg, byte* value, byte len){
  CSN_LOW();
  SPI.transfer(W_REGISTER | (REGISTER_MASK & reg));
  for (int i = 0; i < len; i++){
    SPI.transfer(value[i]);
  }
  CSN_HIGH(); 
}

byte get_nfr_status(){
  byte lv_status = 0x0;
  CSN_LOW();
  lv_status = SPI.transfer(NOP);
  CSN_HIGH();  
  return lv_status;
}

void CE_HIGH(){
  digitalWrite(chipEnablePin, HIGH);
}

void CE_LOW(){
  digitalWrite(chipEnablePin, LOW);
}

void CSN_HIGH(){
  digitalWrite(chipSelectNotPin, HIGH);
}

void CSN_LOW(){
  digitalWrite(chipSelectNotPin, LOW);
}


void read_rx(byte *rx_buf, int rx_size){
  CSN_LOW();
  SPI.transfer(R_RX_PAYLOAD);
  for (int i=0; i<rx_size; i++){
    rx_buf[i] = SPI.transfer(NOP);
  }
  CSN_HIGH(); 
}

void flush_rx(){
  CSN_LOW();
  SPI.transfer(FLUSH_RX);
  CSN_HIGH(); 
}

io invece per far comunicare i miei arduino utilizzo un codice simile a quello che viene mostrato negli esempi delle librerie nrf24 tipo Gettingstarted o pingpair che utilizzano altre dichiarazioni per indicare address, channel etc....

Questo invece è il modello di codice che ho utilizzato per far comunicare i miei 2 arduino collegati tramite RF24
se necessario posso postare gli sketch che utilizzo

Grazie mille per la collaborazione

/*
 Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 version 2 as published by the Free Software Foundation.
 */

/**
 * Example for Getting Started with nRF24L01+ radios. 
 *
 * This is an example of how to use the RF24 class.  Write this sketch to two 
 * different nodes.  Put one of the nodes into 'transmit' mode by connecting 
 * with the serial monitor and sending a 'T'.  The ping node sends the current 
 * time to the pong node, which responds by sending the value back.  The ping 
 * node can then see how long the whole cycle took.
 */

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"

//
// Hardware configuration
//

// Set up nRF24L01 radio on SPI bus plus pins 9 & 10 

RF24 radio(9,10);

//add this for compatibility to Teensy3 and printf
#if defined(__arm__) && defined(CORE_TEENSY)
#define printf radio.kprintf
#endif
//end

//
// Topology
//

// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };

//
// Role management
//
// Set up role.  This sketch uses the same software for all the nodes
// in this system.  Doing so greatly simplifies testing.  
//

// The various roles supported by this sketch
typedef enum { role_ping_out = 1, role_pong_back } role_e;

// The debug-friendly names of those roles
const char* role_friendly_name[] = { "invalid", "Ping out", "Pong back"};

// The role of the current running sketch
role_e role = role_pong_back;

void setup(void)
{
  //
  // Print preamble
  //

  Serial.begin(57600);
  printf_begin();
  printf("\n\rRF24/examples/GettingStarted/\n\r");
  printf("ROLE: %s\n\r",role_friendly_name[role]);
  printf("*** PRESS 'T' to begin transmitting to the other node\n\r");

  //
  // Setup and configure rf radio
  //

  radio.begin();

  // optionally, increase the delay between retries & # of retries
  radio.setRetries(15,15);

  // optionally, reduce the payload size.  seems to
  // improve reliability
  //radio.setPayloadSize(8);

  //
  // Open pipes to other nodes for communication
  //

  // This simple sketch opens two pipes for these two nodes to communicate
  // back and forth.
  // Open 'our' pipe for writing
  // Open the 'other' pipe for reading, in position #1 (we can have up to 5 pipes open for reading)

  //if ( role == role_ping_out )
  {
    //radio.openWritingPipe(pipes[0]);
    radio.openReadingPipe(1,pipes[1]);
  }
  //else
  {
    //radio.openWritingPipe(pipes[1]);
    //radio.openReadingPipe(1,pipes[0]);
  }

  //
  // Start listening
  //

  radio.startListening();

  //
  // Dump the configuration of the rf unit for debugging
  //

  radio.printDetails();
}

void loop(void)
{
  //
  // Ping out role.  Repeatedly send the current time
  //

  if (role == role_ping_out)
  {
    // First, stop listening so we can talk.
    radio.stopListening();

    // Take the time, and send it.  This will block until complete
    unsigned long time = millis();
    printf("Now sending %lu...",time);
    bool ok = radio.write( &time, sizeof(unsigned long) );
    
    if (ok)
      printf("ok...");
    else
      printf("failed.\n\r");

    // Now, continue listening
    radio.startListening();

    // Wait here until we get a response, or timeout (250ms)
    unsigned long started_waiting_at = millis();
    bool timeout = false;
    while ( ! radio.available() && ! timeout )
      if (millis() - started_waiting_at > 200 )
        timeout = true;

    // Describe the results
    if ( timeout )
    {
      printf("Failed, response timed out.\n\r");
    }
    else
    {
      // Grab the response, compare, and send to debugging spew
      unsigned long got_time;
      radio.read( &got_time, sizeof(unsigned long) );

      // Spew it
      printf("Got response %lu, round-trip delay: %lu\n\r",got_time,millis()-got_time);
    }

    // Try again 1s later
    delay(1000);
  }

  //
  // Pong back role.  Receive each packet, dump it out, and send it back
  //

  if ( role == role_pong_back )
  {
    // if there is data ready
    if ( radio.available() )
    {
      // Dump the payloads until we've gotten everything
      unsigned long got_time;
      bool done = false;
      while (!done)
      {
        // Fetch the payload, and see if this was the last one.
        done = radio.read( &got_time, sizeof(unsigned long) );

        // Spew it
        printf("Got payload %lu...",got_time);

	// Delay just a little bit to let the other unit
	// make the transition to receiver
	delay(20);
      }

      // First, stop listening so we can talk
      radio.stopListening();

      // Send the final one back.
      radio.write( &got_time, sizeof(unsigned long) );
      printf("Sent response.\n\r");

      // Now, resume listening so we catch the next packets.
      radio.startListening();
    }
  }

  //
  // Change roles
  //

  if ( Serial.available() )
  {
    char c = toupper(Serial.read());
    if ( c == 'T' && role == role_pong_back )
    {
      printf("*** CHANGING TO TRANSMIT ROLE -- PRESS 'R' TO SWITCH BACK\n\r");

      // Become the primary transmitter (ping out)
      role = role_ping_out;
      radio.openWritingPipe(pipes[0]);
      radio.openReadingPipe(1,pipes[1]);
    }
    else if ( c == 'R' && role == role_ping_out )
    {
      printf("*** CHANGING TO RECEIVE ROLE -- PRESS 'T' TO SWITCH BACK\n\r");
      
      // Become the primary receiver (pong back)
      role = role_pong_back;
      radio.openWritingPipe(pipes[1]);
      radio.openReadingPipe(1,pipes[0]);
    }
  }
}
// vim:cin:ai:sts=2 sw=2 ft=cpp

Verrano usate due librerie diverse, ma qual'è la domanda?

grazie flz per l'interessamento la mia domanda è come faccio ad integrare il codice per la lettura dei valori inviati dal cardio nel codice che uso per far comuicare i miei due arduino?

Per ricevere i dati dal polar uso questo Setup

#include <SPI.h>
#include "nRF24L01.h"

const int chipSelectNotPin = 53;
const int chipEnablePin = 9;
const int addressSize = 2;
const int packetLength = 28 - addressSize;
const int sensorPin =  2;      // the number of the LED pin

int pulseState = LOW;          // pulseState used to set off the sensor
long previousMillis = 0;       // will store last time pulse signal was changed

long pulseIntervalOn = 1;
long pulseIntervalOff = 1000;

void setup(){
  Serial.begin(115200);

  // initalize the  data ready and chip select pins:
  pinMode(chipEnablePin, OUTPUT);
  pinMode(chipSelectNotPin, OUTPUT);  
  pinMode(sensorPin, OUTPUT);

  // start the SPI library:
  SPI.setDataMode(SPI_MODE0);
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(SPI_2XCLOCK_MASK);
  SPI.begin();

  Serial.println("Configuring nRF...");
  // 1Mbps
  byte lv_rf_setup = 0x0;
  write_reg(RF_SETUP,&lv_rf_setup,1);
  
  //Freq channel
  byte lv_rf_ch = 73;
  write_reg(RF_CH, &lv_rf_ch, 1);
  
  //set address length
  byte lv_setup_aw = 0b00;
  switch (addressSize){
    case 2:
      lv_setup_aw = 0b00;
      break;
    case 3:
      lv_setup_aw = 0b01;
      break;
    case 4:
      lv_setup_aw = 0b10;
      break;
    case 5:
      lv_setup_aw = 0b11;
      break;
  }
  write_reg(SETUP_AW, &lv_setup_aw, 1);
  
  //Disable autoretransmit
  byte lv_setup_retr = 0x0;
  write_reg(SETUP_RETR, &lv_setup_retr, 1);
  
  //Disable Enchanced ShockBurst
  byte lv_en_aa = 0x0;
  write_reg(EN_AA, &lv_en_aa, 1);
  
  //Disable Pipe 1;
  byte lv_rx_pw_p1 = 0x0;
  write_reg(RX_PW_P1, &lv_rx_pw_p1, 1);
  
  //Set data length in pipe 0;
  byte lv_rx_pw_p0 = packetLength;
  write_reg(RX_PW_P0, &lv_rx_pw_p0, 1);
  
  //Set address
  byte lv_addr[5];
  lv_addr[1] = 0xC6;
  lv_addr[0] = 0xA1;
//  lv_addr[4] = 0xC6;
//  lv_addr[3] = 0xA1;
//  lv_addr[2] = 0x01;
//  lv_addr[1] = 0xF8;
//  lv_addr[0] = 0x11;
  write_reg(RX_ADDR_P0, &lv_addr[0], addressSize);
  
  //Flush RX buffer
  flush_rx();
  
  //Enable 16bit CRC and power up in RX mode
  byte lv_config = (1<<PWR_UP) | (1<<PRIM_RX) | (1<<EN_CRC) | (1<<CRCO);
  write_reg(CONFIG, &lv_config, 1);

  delay(50);
  
  //Enable nRF
  CE_HIGH();
  delay(10);
}

Per Arduino Server uso questo setup

#include <SPI.h>
#include <nRF24L01.h>
#include "RF24.h"
#include <Servo.h> 

RF24 radio(9,10);
const uint64_t pipes[2] = { 
  0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
 
 
void setup() {
       
  radio.begin();
  radio.openWritingPipe(pipes[1]);
  radio.openReadingPipe(1,pipes[0]);
  radio.startListening();
  
}

invece per arduino Client uso questo setup

#include <SPI.h>
#include <nRF24L01.h>
#include "RF24.h"
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 7, 5, 4, 3, 2);
 
 
RF24 radio(9,10);
 
const uint64_t pipes[2] = { 
  0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
 
 
void setup(){
  radio.begin();
  radio.openWritingPipe(pipes[0]);
  radio.openReadingPipe(1,pipes[1]);
  radio.startListening();
  lcd.begin(20, 4);

 

}

il mio obbiettivo è di integrare il codice di Arduino per leggere il sensore Polar nel codice Arduino Server e poi di conseguenza anche in Arduino Client

Devi sostituire tutte le chiamate alla libreria nrf24 diversa con quella che utilizzi.
Se non hai un mapping 1:1 delle funzioni devi scervellarti un poco.

Purtroppo non ho idea di cosa sia il mapping 1:1 e tantomeno non saprei da dove partire per modificare la libreria

mi daresti una mano?

Con mapping 1:1 intendo una corrispondenza uno a uno delle funzioni tra le due librerie.

Parti cercando di capire come funzionano queste librerie e come funziona il chip nrf24, in rete c'è molto materiale.

prima di scrivere sul forum ho gia provato a scervellarmi un po e ti mostro i risultati che spero di aver ottenuto e dove mi sono fermato

 // 1Mbps
  byte lv_rf_setup = 0x0;
  write_reg(RF_SETUP,&lv_rf_setup,1);

//lo cambio con questo

radio.setDataRate(RF24_1MBPS);
  //Freq channel
  byte lv_rf_ch = 73;
  write_reg(RF_CH, &lv_rf_ch, 1);


   radio.setChannel(73);

questa parte non saprei come convertirla

  //set address length
  byte lv_setup_aw = 0b00;
  switch (addressSize){
    case 2:
      lv_setup_aw = 0b00;
      break;
    case 3:
      lv_setup_aw = 0b01;
      break;
    case 4:
      lv_setup_aw = 0b10;
      break;
    case 5:
      lv_setup_aw = 0b11;
      break;
  }
  write_reg(SETUP_AW, &lv_setup_aw, 1);
  
  //Disable autoretransmit
  byte lv_setup_retr = 0x0;
  write_reg(SETUP_RETR, &lv_setup_retr, 1);
  
  //Disable Enchanced ShockBurst
  byte lv_en_aa = 0x0;
  write_reg(EN_AA, &lv_en_aa, 1);
  
  //Disable Pipe 1;
  byte lv_rx_pw_p1 = 0x0;
  write_reg(RX_PW_P1, &lv_rx_pw_p1, 1);
  
  //Set data length in pipe 0;
  byte lv_rx_pw_p0 = packetLength;
  write_reg(RX_PW_P0, &lv_rx_pw_p0, 1);
  
  //Set address
  byte lv_addr[5];
  lv_addr[1] = 0xC6;
  lv_addr[0] = 0xA1;
//  lv_addr[4] = 0xC6;
//  lv_addr[3] = 0xA1;
//  lv_addr[2] = 0x01;
//  lv_addr[1] = 0xF8;
//  lv_addr[0] = 0x11;
  write_reg(RX_ADDR_P0, &lv_addr[0], addressSize);

sto sbagliando tutto?

La prima parte va bene, quella che non riesci a convertire semplicemente imposta:

  • lunghezza in byte indirizzi di rx/tx (sembra la metta a 2 soli byte)
  • disabilita autoritrasmissione e enhanced shockburst
  • disabilita pipe 1 (usata per autoritrasmissione)
  • payload pipe 0 di 1 byte

così facendo la comunicazione diventa molto instabile secondo me però..

Le pipe sono semplicemente canali di comunicazione, leggiti ad ogni modo Explore our product portfolio - nordicsemi.com se riesci a capirlo.

Ci sono nmila librerie chiamate RF24, posta il link a quella che utilizzi o allega i sorgenti

flz47655:

  • lunghezza in byte indirizzi di rx/tx (sembra la metta a 2 soli byte)
  • disabilita autoritrasmissione e enhanced shockburst
  • disabilita pipe 1 (usata per autoritrasmissione)
  • payload pipe 0 di 1 byte

così facendo la comunicazione diventa molto instabile secondo me però..

mi sembrava di aver capito che l'autoritrasmissione viene disabilitata ed anche lo shockburst (ma non ho capito se mi servono per poi far ritrasmettere tutti i dati verso l'altro Arduino Client (ma forse questo è meglio vederlo dopo).

proverò a leggermi un po il datasheet che mi hai inviato e nel frattempo ti allego il file zip con la libreria RF24 che uso. grazie ancora

RF24 Library

Devi leggerti i sorgenti della tua libreria, che non sono semplicissimi se non sei pratico.

Ti faccio un esempio

La libreria che hai usa di default 5 byte per gli indirizzi, lo noti dalla riga 403 di RF24/RF24.cpp at master · maniacbug/RF24 · GitHub

write_register(RX_ADDR_P0, reinterpret_cast<const uint8_t*>(&pipe0_reading_address), 5);

Ciao

Quindi per come dici tu se ho capito bene modifico il registro per leggere solo 2 byte come dichiara qui

  //set address length
  byte lv_setup_aw = 0b00;
  switch (addressSize){
    case 2:
      lv_setup_aw = 0b00;
      break;
    case 3:
      lv_setup_aw = 0b01;
      break;
    case 4:
      lv_setup_aw = 0b10;
      break;
    case 5:
      lv_setup_aw = 0b11;
      break;
  }
  write_reg(SETUP_AW, &lv_setup_aw, 1);

in questo modo?

write_register(RX_ADDR_P0, reinterpret_cast<const uint8_t*>(&pipe0_reading_address), 2);

poi l'address che è questo

//Set address
  byte lv_addr[5];
  lv_addr[1] = 0xC6;
  lv_addr[0] = 0xA1;
//  lv_addr[4] = 0xC6;
//  lv_addr[3] = 0xA1;
//  lv_addr[2] = 0x01;
//  lv_addr[1] = 0xF8;
//  lv_addr[0] = 0x11;
  write_reg(RX_ADDR_P0, &lv_addr[0], addressSize);

lo faccio diventare questo? in modo da avere il primo address in ricezione e l'altro in trasmissione

const uint64_t pipes[2] = { 0xF0F0F0C6A1LL, 0xF0F0F00C6A2LL };

dimmi se sono sulla strada giusta cosi cerco di completare il codice e fare i dovuti test

ho fatto alcune modifiche ed applicando questo codice

#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
#include "printf.h"
RF24 radio(9,10);
const uint64_t pipes[3] = { 0xF0F0F0C6A1LL, 0xF0F0F00C6A2LL, 0xF0F0F00C6A3LL };

const int chipSelectNotPin = 10;
const int chipEnablePin = 9;
const int addressSize = 2;
const int packetLength = 28 - addressSize;

void setup(){
  Serial.begin(115200);
  printf_begin();


  // start the SPI library:
  SPI.setDataMode(SPI_MODE0);
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(SPI_2XCLOCK_MASK);
  SPI.begin();


  radio.begin();
    
  radio.setDataRate(RF24_1MBPS);
  radio.setPALevel(RF24_PA_MIN);
  radio.setChannel(73);
  radio.openWritingPipe(pipes[2]);
  radio.openReadingPipe(0,pipes[0]);
  radio.openReadingPipe(1,pipes[1]);
  radio.startListening();

  radio.printDetails();

}

ottengo questo risultato

STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1	 = 0xf0f0f0c6a1 0x0f0f00c6a2

RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6

TX_ADDR		 = 0x0f0f00c6a3

RX_PW_P0-6	 = 0x20 0x20 0x00 0x00 0x00 0x00

EN_AA		 = 0x00

EN_RXADDR	= 0x03

RF_CH		 = 0x49

RF_SETUP	= 0x00

CONFIG		 = 0x0f

DYNPD/FEATURE	 = 0x00 0x00

Data Rate	 = 1MBPS
Model		 = nRF24L01+
CRC Length	 = 16 bits
PA Power	 = PA_MIN

mentre con il codice che legge il sensore polar ottengo questo dal serial monitor

STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1	 =0xe7e7e7c6a1 0xc2c2c2c2c2
RX_ADDR_P2-5	= 0xc3 0xc4 0xc5 0xc6
TX_ADDR		 = 0xe7e7e7e7e7
RX_PW_P0-6	 = 0x1a 0x00 0x00 0x00 0x00 0x00
EN_AA		 = 0x00
EN_RXADDR	= 0x03
RF_CH		 = 0x49
RF_SETUP	= 0x00
CONFIG		 = 0x0f
DYNPD/FEATURE	 = 0x00 0x00
Data Rate	 = 1MBPS
Model		 = nRF24L01+
CRC Length	 = 16 bits
PA Power	 = PA_MIN

credo di avercela fatta anche se la ricezione dei dati è un po lentina rispetto al file originale

questa è la mia configurazione

grazie ancora FLZ

radio.begin();
  radio.setDataRate(RF24_1MBPS);
  radio.setPALevel(RF24_PA_MIN);
  radio.setChannel(73);
  radio.setPayloadSize(26);
  radio.setAutoAck(0);
  radio.setCRCLength(RF24_CRC_16);
  radio.openWritingPipe(pipes[2]);
  radio.openReadingPipe(0,pipes[0]);
  radio.openReadingPipe(1,pipes[1]);
  radio.setAddressWidth(6);
  radio.setRetries(0,0);
  radio.startListening();
  radio.printDetails();

Bene :wink: