RF24Network | Network Layer for nRF24L01 Radios | Navigation library
kandi X-RAY | RF24Network Summary
kandi X-RAY | RF24Network Summary
Network Layer for nRF24L01(+) Radios
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of RF24Network
RF24Network Key Features
RF24Network Examples and Code Snippets
Community Discussions
Trending Discussions on RF24Network
QUESTION
I'm doing wireless sensor node using esp32 (slave) and rf24l01 module. My next step is to put my slave in sleep mode (maybe deep sleep). Can I use deep sleep for my project?
They said
everything stored in that memory is wiped out and cannot be accessed.
So is all my void setup()
code wiped out? Or just my pack0.temp, humid, soil is wiped out?
My code is attached below
...ANSWER
Answered 2019-Jun-25 at 15:49When the ESP32 enters deep sleep, it turns off the processor that's running your code. The contents of memory and the current state of the processor are lost. It costs power to maintain the contents of its memory and the CPU state, and the point of deep sleep is to save as much power as possible, so it stops powering these things.
So when it restarts out of deep sleep it's as if it just powered up. Your setup()
function will run again and will need to do any initialization again.
There are a couple of ways to preserve state across sleep cycles.
Obviously you can store data in flash memory using EEPROM
or SPIFFS
. Writing to flash is slow and costs a lot of power, so this isn't great if you're running off a battery.
You can also store data in the static RAM that's part of the real-time-clock (RTC). This RAM is built into the ESP32 and is maintained during deep sleep. Its contents will be lost or cleared when the ESP32 loses power or is flashed.
You can declare a variable to live in the RTC RAM using RTC_DATA_ATTR
. For instance:
QUESTION
Could anyone help me with my C++ program? I'm experiencing a segmentation fault and I can't find the problem. I'm writing a program for my raspberry pi that communicates with an nRF24L01 sensor network and sends data to a dashboard (Dashing) hosted on my RPi using CURL.
I ran my program with a debugger (gdb), and this is the backtrace I got: (see below for the full source code)
...ANSWER
Answered 2017-Feb-09 at 12:05The offending code was this block here (in sendDataToDashBoard):
QUESTION
The development for embedded system impose an other way to code.
In the goal to minimize size of my library named RF24Wave
, I would adapt the structure of my main class.
The idea is to declare some functions only with the presence of certain #define
during the inclusion of my library in main program.
The popular library, like MySensor
use this way to minimize memory footprint.
So, I have two files for my library :
RF24Wave.h
: header file which contain function declarations
ANSWER
Answered 2017-Jan-25 at 15:23If you add your library in the arduino IDE as it is described here it just consists in linking another project to your library functions. It's not a static library (see static and dynamic libraries). Then I think it's not necessary to worry about its size since the compiler will embed your library functions only if you use them.
Try opening any example (AnalogReadSerial), compile it. Then Sketch->Add a library->SPI. Compile it again, the size does not change. Try to call SPI.begin()
in the setup function, the size increases. Add a call to SPI.setBitOrder(MSBFIRST);
, the size increases again. Add another call to SPI.setBitOrder(MSBFIRST);
, the size increases again, but not by the same amount since it contains only one setBitOrder definition and two calls to the setBitOrder function.
That's not exactly true for all libraries since some constructs could force the compiler to embed some code or allocate memory even if the variable is not used (see for instance volatile variables).
So regarding your size issue, you'd probably only need to use one #define MASTER
, write the master code in setup and loop functions surrounded by #ifdef MASTER
and the slave code surrounded by #else...#endif
. The compiler will include the function definitions that both master or slave use.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install RF24Network
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page