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 ...
user avatar
  • 240
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 ...
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 ...
user avatar
  • 103k
7 votes
Accepted

Increasing payload size above 32 bytes using nRF24L01+

If you look at the specification or datasheet for the nRF24l01+, you will see that the 32 byte payload is the maximum that the device can handle. For example: If you need to transmit anything larger ...
user avatar
6 votes
Accepted

Choosing wireless tech for lowest possible lag

I've used NRF24L01+ chipset 2.4GHz wireless modules with Arduino before, and found them to be great, and super cheap (~$10 for 10 of them on ebay!). They have 3 modes of transmission: 250kbps, 1Mbps, ...
user avatar
  • 373
5 votes
Accepted

NRF24L01+ scanning and connecting to wifi hotspots or creating one

It does seem possible, check out this thread on Arduino forums, where cpixip worked directly with the NRF24 SPI interface to accomplish that. Here is the code he published, in case the link won't be ...
user avatar
  • 1,369
5 votes
Accepted

nRF24L01 pipe question

As most of the people have posted, the values for the pipe are arbitrary, but must follow the rules per the API: Pipes 1-5 should share the first 32 bits. Only the least significant byte should ...
user avatar
  • 1,128
5 votes
Accepted

OTA updates for Arduino using nRF24L01+

Your best strategy would be to write your own bootloader. The existing bootloader receives data through the serial port and writes it, a page at a time, to the flash. Your custom bootloader, instead,...
user avatar
  • 103k
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 ...
user avatar
  • 41
4 votes
Accepted

Not able to make my NrF24L01 work

Just added a 47uf capacitor to the pin 1 and 2 in NF24L01 ,then every thing worked fine this is the new setup .
user avatar
  • 83
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 ...
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 ...
user avatar
  • 8,829
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 ...
user avatar
  • 11.1k
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 ...
user avatar
  • 103k
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 ...
user avatar
  • 103k
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 ...
user avatar
  • 103k
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
user avatar
3 votes
Accepted

Portable power for an UNO with a nrf24l01+ attached?

I've used the usb battery chargers (marketed to recharge cell phones) with great success on many different Arduino boards. They come in a variety of mAH capacities and are easily recharged with any ...
user avatar
3 votes

Sending large structs via nrf24l01 leads to cliping of some structs members

Your payload is too big. You will have to split it to smaller pieces. NOTE: If you'd use a library like RF24Mesh then you'd not have to worry about it.
user avatar
  • 619
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 ...
user avatar
  • 31
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#...
user avatar
3 votes
Accepted

Need help understanding how RF communication works with 2 arduinos

Many questions so broad answers, but hopefully informative for your research What is the nature of the data sent between units? I want to send integers, possibly even text. Is that possible? Do I ...
user avatar
  • 226
3 votes
Accepted

NRF24 Mixing with/without antenna

Yes, and yes. A module without an antenna is exactly the same as a module with an antenna, it's just that the antenna is part of the PCB. Yes, the module with the antenna will have more sensitivity (...
user avatar
  • 103k
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 ...
user avatar
  • 103k
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 ...
user avatar
  • 103k
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,...
user avatar
  • 103k
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 ...
user avatar
  • 389
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 ...
user avatar
  • 36.9k
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
user avatar
  • 619
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 ...
user avatar
  • 510

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