You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got some operations that are quite fragile to timing [multi-threading is not possible] and using network.write in between causes these operations to fail. I only want to write for sending agnostic data back to my master node, so it receiving this data is non-critical. Can I somehow write asynchronously? - I've noticed that the RF24 has a startWrite method, could I somehow use this without having to sacrifice the additional benefits [reliable data transfers] that RF24Network gives me?
The text was updated successfully, but these errors were encountered:
lbirkert
changed the title
How to use .write without blocking
[Q]: How to use .write without blocking
Feb 6, 2024
lbirkert
changed the title
[Q]: How to use .write without blocking
[Q]: How to use .write asynchronously
Feb 6, 2024
ok = radio.writeFast(frame_buffer, frame_size, 0);
if (!(networkFlags & FLAG_FAST_FRAG)) {
ok = radio.txStandBy(txTimeout);
radio.setAutoAck(0, 0);
}
There is no way to write asynchronously from RF24Network/Mesh. Normally, I'd suggest inheriting from RF24Network and overwriting some behavior, but it wouldn't be that easy because
messages over 24 bytes long are fragmented into a series of 24 byte payloads with changing RF24NetworkHeader info.
Receiving payloads (during network.update()) isn't designed for using interrupts.
I think your best approach is to separate out some of the logic in your app to different processors. The RP2040 seems well suited for this because it is a dual-core processor.
I've got some operations that are quite fragile to timing [multi-threading is not possible] and using
network.write
in between causes these operations to fail. I only want to write for sending agnostic data back to my master node, so it receiving this data is non-critical. Can I somehow write asynchronously? - I've noticed that the RF24 has astartWrite
method, could I somehow use this without having to sacrifice the additional benefits [reliable data transfers] that RF24Network gives me?The text was updated successfully, but these errors were encountered: