Comments (4)
printf_begin(); is call after Serial is started. This code worked flawlessly with and RF-Nano but not for the MKR?
Our library's printf_begin()
is just a helper function to integrate the RF24 library's printf()
calls with the default Serial
object, but it only does this for boards that can use printf()
Radio.sprintfPrettyDetails(buffer); works fine????
Of course it does, because it doesn't use printf()
. It uses sprintf()
(which uses buffers instead of a stream like printf()
does). The functions sprintfPrettyDetails()
and encodeRadioDetails()
were designed as an alternative way to get debugging information on boards that don't support printf()
.
I think your confusion is really just from not understanding the difference between printf()
and sprintf()
functions from the C standard library (cstdio.h
).
MKR1010 uses a ATSAMD21 chip
That board uses the Arduino SAMD core, which does not support printf()
.
Tip
An Adafruit board that uses the ATSAMD21 can use printf()
because it is supported by Adafruit's fork of the Arduino SAMD core.
RF-Nano uses ATmega328
That board just uses the Arduino AVR core which does support printf()
.
from rf24.
Has it been considered to use LibPrintf library.
Work fine with MKR1010.
from rf24.
No, we haven't considered using another library just for debugging output on some boards.
LibPrintf hasn't been updated in years. If there were problems, then we (and our users) would have to hope that the LibPrintf authors are still responsive... 👎
If you're using PlatformIO, then it would be easy to make RF24 use LibPrintf. You just need to add a #define
to the build_flags
.
build_flags =
-Dprintf_P=printf
Otherwise, if you're using Arduino IDE with a board that doesn't support printf()
, then you can use sprintfPrettyDetails()
.
from rf24.
No, we haven't considered using another library just for debugging output on some boards.
This isn't entirely true. We had started developing RF24Log but stopped when we couldn't decide on how to control verbosity (logging level) per origin of logs.
from rf24.
Related Issues (20)
- nRF24L01+ gets recognized as nRF24L01 after software reboot HOT 7
- STM32F411 doesn't receive data HOT 4
- [feature request] support ESP-IDF platform HOT 19
- namespace for utility drivers HOT 3
- Multiple I2C buses In ESP 32 with multiple ports
- ESP32 and two Infrared Temperature Sensors (MLX90614) HOT 1
- Calling radio.available() after failed transmission when using writeFast or startWrite causes interrupt loop HOT 10
- 'make' errors, and RF24 on RPi, aarch64-linux-gnu HOT 18
- [Question] NRF24 Transmitter get "stuck" when powered from wall power outlet HOT 2
- RPi5 uses different gpio pin numbers (per Linux kernel update) HOT 48
- Pipe is sometimes returned at "255". HOT 15
- Is there a known ESP32 Deep Sleep issue with radio.powerDown()? [Question] HOT 19
- Can RF24 library be used with WiFi? HOT 2
- Can RF24 library be used with WiFi? HOT 4
- [Question] setChannel & setDataRate not read correctly by printPrettyDetails ? HOT 4
- ESP32 Core Panic on radio 0; No panic on Radio number 1, same wiring. How to troubleshoot?[Question] HOT 22
- Use Linux kernel's character device API to implement IRQ capability HOT 113
- [Question] R24.h, testRPD(void) "Strong signal > 64dBm" : "Weak signal < 64dBm" HOT 5
- [Question] Issue using the ManualAcknowledgements.ino HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rf24.