I have been using the nrf24l01 modules, and tried a few examples (random number, bi directional ack demo, motor drive, dimmer) and has success with all (eventually)
So i moved on to build a radio controlled 240v ~ Fan for a particular pottery project for my wife.
Cutting a long story short all is well, but i wasn’t aware of this issue…
The transmitter is hand held, 9v battery operated,10k pot voltage divider to A0 etc. battery failed eventually - and no rf signal being sent but the fan continued, monitoring D3 pwm (which drives my thyristor module) i noticed the output was still active - i then edited tx code to minimum rf power to intentionally make the rx lose reception and the same result occurred.
Took it for granted that if it loses reception that the pwm D3 would be switched off.
Had a read up on the subject, and seems to be an edit required named failsafe ?
When i thought about it anyone using the nrf modules for a rc car, drone etc would use this option - otherwise car or drone would carry on into the sunset never to be seen again if rf signal failed.
Had a couple of hours today which was disastrous, but managed to get back up and running and back to square one.
I found several snippets of code and attempted to add to my sketch but as previously mentioned it didn’t go very well.
Would be grateful for a little advice if anyone has had the same experience ?
All i need to do is turn off D3 pwm if no signal detected
Do i need to look at the radio signal for 0.5s and if no signal (data) reset. ? or is it the rx that detects the tx is connected rather than data being received ?
I believe it needs to go into line 52 after radio begin.
Sorry if code is scruffy, it’s my first.
nRF24l01_receiver.ino (2.55 KB)