Giter Club home page Giter Club logo

Comments (4)

2bndy5 avatar 2bndy5 commented on September 27, 2024 1
if(radio.begin()== 0)

@matou78 This sets up the radio with default values. All configurations should be done after calling radio.begin().

from rf24.

matou78 avatar matou78 commented on September 27, 2024 1
if(radio.begin()== 0)

@matou78 This sets up the radio with default values. All configurations should be done after calling radio.begin().

Mate you are a genius , I am just retarded xD it's working now lol
Thank you a lot

in case anyone come here for the same issue, here is the correct code

#include <Arduino.h>
#include "RF24.h"
#include "printf.h"

const byte adresse[5] = {0xAA,0x0A,0x0A,0x0A,0xAA};  

#define CE_PIN PIN_PD5
#define CSN_PIN PIN_PD6


RF24 radio(CE_PIN, CSN_PIN, 40000000);


void setup(void) {

  Serial.begin(9600);
  printf_begin();
  delay(1000);

  Serial.println("------------------------------------------Start------------------------------------------------------");
  Serial.println("Test connexion NRF24L01 version SMD");

  if(radio.begin()== 0)
  {
    Serial.println("erreur connexion !");
  }else{
    Serial.println("connection ok");
  }

  radio.setAddressWidth(5);
  radio.setChannel(0x05);
  radio.enableDynamicPayloads();
  radio.openWritingPipe(adresse);
  radio.enableAckPayload();
  radio.setDataRate(RF24_250KBPS);
  radio.setPALevel(RF24_PA_LOW);
  radio.openReadingPipe(1,adresse);

  delay(1000);


  
  Serial.println("----------------------------------------RX mode------------------------------------------------------");
  radio.startListening();
  radio.printPrettyDetails();
  Serial.println("----------------------------------------TX mode-----------------------------------------------------");
  radio.stopListening();
  radio.printPrettyDetails();
  Serial.println("------------------------------------------END--------------------------------------------------------");
}

void loop(void) {
  
}

from rf24.

2bndy5 avatar 2bndy5 commented on September 27, 2024

Have you read the common_issues doc? There's a section about if printDetails() outputs incorrectly.

from rf24.

matou78 avatar matou78 commented on September 27, 2024

Hello @2bndy5 , yes i tried it, but didn't push it further on this side as on the output it is not changing too
this is my output

------------------------------------------Start------------------------------------------------------
Test connexion NRF24L01 version SMD
connection ok
----------------------------------------RX mode------------------------------------------------------
SPI Frequency		= 10 Mhz
Channel			= 76 (~ 2476 MHz)
Model			= nRF24L01+
RF Data Rate		= 1 MBPS
RF Power Amplifier	= PA_LOW
RF Low Noise Amplifier	= Enabled
CRC Length		= 16 bits
Address Length		= 5 bytes
Static Payload Length	= 32 bytes
Auto Retry Delay	= 1500 microseconds
Auto Retry Attempts	= 15 maximum
Packets lost on
    current channel	= 0
Retry attempts made for
    last transmission	= 0
Multicast		= Disabled
Custom ACK Payload	= Disabled
Dynamic Payloads	= Disabled
Auto Acknowledgment	= Enabled
Primary Mode		= RX
TX address		= 0xaa0a0a0aaa
pipe 0 (closed) bound	= 0xaa0a0a0aaa
pipe 1 ( open ) bound	= 0xaa0a0a0aaa
pipe 2 (closed) bound	= 0xc3
pipe 3 (closed) bound	= 0xc4
pipe 4 (closed) bound	= 0xc5
pipe 5 (closed) bound	= 0xc6
----------------------------------------TX mode-----------------------------------------------------
SPI Frequency		= 10 Mhz
Channel			= 76 (~ 2476 MHz)
Model			= nRF24L01+
RF Data Rate		= 1 MBPS
RF Power Amplifier	= PA_LOW
RF Low Noise Amplifier	= Enabled
CRC Length		= 16 bits
Address Length		= 5 bytes
Static Payload Length	= 32 bytes
Auto Retry Delay	= 1500 microseconds
Auto Retry Attempts	= 15 maximum
Packets lost on
    current channel	= 0
Retry attempts made for
    last transmission	= 0
Multicast		= Disabled
Custom ACK Payload	= Disabled
Dynamic Payloads	= Disabled
Auto Acknowledgment	= Enabled
Primary Mode		= TX
TX address		= 0xaa0a0a0aaa
pipe 0 ( open ) bound	= 0xaa0a0a0aaa
pipe 1 ( open ) bound	= 0xaa0a0a0aaa
pipe 2 (closed) bound	= 0xc3
pipe 3 (closed) bound	= 0xc4
pipe 4 (closed) bound	= 0xc5
pipe 5 (closed) bound	= 0xc6
------------------------------------------END--------------------------------------------------------

from rf24.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.