12 votes

Same structure taking different memory space on Uno and NodeMCU ESP8266, leading to data corruption when transferring via nRF24L01+

int, long, etc have different sizes depended on the compiler and target. Use explicit sizes to make sure you're variables have the size you want. Eg. uint8_t, int16_t or int32_t, ... (as @Mat ...
Swedgin's user avatar
  • 241
12 votes
Accepted

Same structure taking different memory space on Uno and NodeMCU ESP8266, leading to data corruption when transferring via nRF24L01+

There are three main issues you may need to deal with when passing structures between systems that use different processors. The first is that data types vary in size between architectures. You can ...
Peter Green's user avatar
9 votes

Same structure taking different memory space on Uno and NodeMCU ESP8266, leading to data corruption when transferring via nRF24L01+

In addition to the rule of always using fixed and predictable sizes across different architectures, it's also a good idea to pack your structs. This prevents the compiler from padding smaller ...
Majenko's user avatar
  • 105k
4 votes

OTA updates for Arduino using nRF24L01+

There is an Arduino optiboot fork for this now, which seems to handle what you want. You would use a PC, RPi or whatever that could run avrdude to send the update to an Arduino acting as the update ...
Kurt's user avatar
  • 41
4 votes

Choosing wireless tech for lowest possible lag

Have you considered using real time clocks? You could synchornise them all ahead of time and then use any wireless protocol. Once a button is pressed, you'll look for the unit that reports the ...
Squats's user avatar
  • 119
4 votes

Dereferencing char into a struct

In your situation, your best bet is probably to use the standard C function strcpy: payload_t payload; char* source = "abcdef"; strcpy(payload.sensorid, source); Note that source string does not ...
jfpoilpret's user avatar
  • 9,112
4 votes
Accepted

Reduce 5v Trinket Pro to 3.3v?

The NRF24L01+ has inputs that are 5V tolerant! So you only need to provide 3.3V on the Vcc pin of the module, which you can do by putting a voltage regulator between it, and the 5V of the Trinket. So ...
Gerben's user avatar
  • 11.3k
4 votes

How to automatically reset the NRF24L01 module

This is a known problem with those chips (especially Chinese clones). It is caused when a chip gets stuck in TX mode waiting for an ACK that never arrives back. The chips don't have a "reset", but ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Sending data struct with 2 int fields from Arduino to Raspberry via NRF24L01

Your problem is that you are communicating between an 8-bit and a 32-bit architecture. On an 8-bit architecture int is 16 bits. On a 32-bit it's 32 bits. Why the difference? Because "it is". ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Understanding NRF24L01 specifications

It uses the 2.4 GHz band Does this refer to the frequency of the EM waves that the device uses to communicate? Yes. It generates (and receives) radio waves in the region of 2.5GHz. If used in open ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Nrf24l01 smd pcb placement tips

You need to keep the ground plane away from the antenna. The rest of the module doesn't care (and having a ground plane under it can help with unwanted EMI). Here's a design I did recently for a ...
Majenko's user avatar
  • 105k
4 votes

RaspberryPi Pico SPI and nrf24l01

For Arduino-pico core ** MISO - pin GP16 ** MOSI - pin GP19 ** CS - pin GP17 ** SCK - pin GP18 Arduino-mbed core ** MISO - pin GP4 ** MOSI - pin GP3 ** CS - pin GP5 ** SCK - pin GP2
khoih-prog's user avatar
3 votes
Accepted

RF24 tranceivers: trouble with two way communication

The main thing that I can see wrong with your sketch is that the logic of your methodology is backwards. You are spending most of your time either with the radio asleep, or not in listening mode, so ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Run code via NRF24L01+ command "dynamically"?

What you are asking is very tricky at best. Your average Arduino doesn't have enough memory to start storing arrays of Strings. Instead you will need to "distil" the information as it comes in and ...
Majenko's user avatar
  • 105k
3 votes

Arduino RF24 library Delay after write function causes no byte availability

In my situation the issue was with the Transmitter not continuing to transmit after a delay. I was able to resolve the issue using the powerDown (http://maniacbug.github.io/RF24/classRF24.html#...
jclabonde's user avatar
3 votes

OTA updates for Arduino using nRF24L01+

If you're working with remote sensor nodes, perhaps consider the MySensors library. It's got support for two methods of delivering OTA updates - one using a node.js controller running on a rPi; and ...
pdey's user avatar
  • 31
3 votes
Accepted

How to remote control Arduino using an old 2.4Ghz toy remote controller?

You have two options: Use an nRF24L01+ on the Arduino and dismantle the controller to rip out the innards, replacing them with another Arduino and another nRF24L01+. Do not use the nRF24L01+, instead,...
Majenko's user avatar
  • 105k
3 votes

nrf24l01+ with antenna problem

It's likely an issue related to the modules' electric supply. The effects can be packet loss (even down to zero bps) or loss of communication with the module. Two things have to be covered with the ...
sekdiy's user avatar
  • 399
3 votes
Accepted

Reading a .csv file element wise

The read() method works character-wise, not element-wise. Then you have to rethink your algorithm to loop over characters: store each character in a buffer send the whole buffer (i.e. a single ...
Edgar Bonet's user avatar
  • 42.3k
3 votes
Accepted

Having problems compiling this code for NRF24l01 on arduino uno and arduino micro

You have multiple copies of the library. Delete the folder located at: C:\Users\Owner\Documents\Arduino\libraries\RF24ArduinoCommunicator-master
Avamander's user avatar
  • 624
3 votes
Accepted

RF24 Network and Payload

According to the source code: const static unsigned int max_frame_payload_size = MAX_FRAME_SIZE-sizeof(RF24NetworkHeader); that would be 24 bytes. Maximum lenght of payload for NRF24L01+ is 32 bytes ...
Chupo_cro's user avatar
  • 510
3 votes
Accepted

Can I compile a sketch for my attiny85 without an arduino board?

Why wouldn't you be able to? The compiler runs on the computer, not on the Arduino board. You don't need a board to be connected to compile either. If you enable verbose output during compile in the ...
Tom Carpenter's user avatar
3 votes

Trouble with NRF24L01

Interesting. I have been having an issue with nRF24L01's as well so I tried your code (modified to work toggling the transmitter and printing the output). You are possibly getting the same issue as me ...
PyNZ's user avatar
  • 111
3 votes

Wireless Communication with NRF24L01+

firstly, the radio.write command is used for checking for the acknowledgement from the RX after the FIFOs are full for a single write. But radio.writefast will not wait for the acknowledgement from ...
Sumit Panse's user avatar
3 votes

how to use AckPayload correctly

I have not used the RF24 libary, but below are the register settings that should be written during void setup() to use the ACK_PAYLOAD functionality (N.B. nRF24L01+ only, does not exist on nRF24L01. ...
MichaelT's user avatar
  • 887
3 votes

nRF24L01 6TXA_1RXA network + 6TXB_1RXB network with arduino

You can use the RF24 library that you can install right away from the Arduino IDE. It provides you all you need. Just use two instances of RF24 with different CSN and CE pins assigned to get started. ...
Kwasmich's user avatar
  • 1,513
3 votes

NRF24L01+ (TMRH20 library): Receiver gets blank data

I have tested your code. There appears to be defective clones of the nRF24L01 around that exhibit an issue I show in post nRF24L01 continuously reading closed pipe You can work around this issue by ...
PyNZ's user avatar
  • 111
3 votes
Accepted

RF24 library commands, channel, and address

A. Does address take character or number as input? The address is 5 bytes. In this library it is provided as an array. In C a string is merely an array of bytes. So it is possible to represent an ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Bluetooth module vs wireless module Arduino

what is the main difference between HC-05 Bluetooth module and NRF24L0 wireless module? The main difference is the protocol they use. While some attempts have been made with varying success to get ...
Majenko's user avatar
  • 105k
3 votes

NRF24 and Arduino Nano Every usage

I stucked with the same problem too when use nRF24L01+ and Arduino Nano Every to transmit data to Arduino Uno with nRF24L01+. So I have solved the problem as follows below. I hope it could help you ...
stremyanka2000's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible