based on https://github.com/LonelyWolf/stm32/tree/master/nrf24l01
This lib is an update an adaptation of the above lib, considering an updated aproach of the communication workflow.
Normal use is:
- TX starts a
nRF24_Talk
with anrf24_data_t
packet made withnRF24_PrepareData
, and can, if needed, wait for an answer. - RX listens to the transmission and sets the
RX_DR
IRQ, after that you cannRF24_GetData
the received packet. - If the packet is a
REQUEST
kind packet, RX should send an answer packet, with aRESPONSE
kind. - RX then retrieves the packet data, with
nRF24_RetrieveData
and do whatever it wants.
Some helpful notes:
- If you pretend using this module, be aware that there is a huge mistake on the unoriginal ones, CRC can't be used normally and this leads to some problems with the full funcionality of the ESB feature.
- Those modules are EXTREMELY sensitive to EMF, do your best to provide steady and clean current to them, also NEVER place it close to switching regulators/sources. I have placed it around 5cm close to a buck converter, and spent more then 2 weeks to finally realize the problem was the noise and coupling and not the module itself...
- If possible, attach an 10uF capacitor to the VCC-GND of the module, this greatly improves it's stability.
- If you have any doubts about the use if this lib feel free to contact me!