Teensy 4 and Arduino Pro Mini NRF24L01 2.4ghz communication

Status
Not open for further replies.

Juaxs

Active member
Hello, im new in this forum and first of all i want to thank all the community.

Im working in a project using NRF24L01 on my new teensy 4 with this code:
Code:
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

const uint64_t pipe = 0xE8E8F0F0E1LL;

RF24 radio(9, 10); //CE and CSN

float datos = 5.5;

void setup(){
  radio.begin();
  Serial.begin(57600); 
  radio.openWritingPipe(pipe);
}
 
void loop(){ 

 int ok = radio.write(&datos, sizeof(&datos));
  if(ok){
     Serial.print("Data sended: "); 
     Serial.println(datos); 
  }
  else
  {
     Serial.println("Unable to send");
     radio.printDetails();
  }
  delay(500);
}

This is only the TX part because is where im getting trouble.

As you can see, its a very simply code but im always getting this "Unable to send" error because is not writing the data into the radio.write part.

Ive tried to use the same code with other arduino pro mini and it sends the data correctly, but with my teensy 4.0 it doesent work at all.

Looking forward...

Im a spanish speaker so maybe im not very clear to explain my issue ;):p:p

Thank you!
 
Status
Not open for further replies.
Back
Top