nrf2401+ changing channel, data rate and power level with RadioHead ReliableDatagram & NRF24 Libraries
@zander ok I got it, now... it wasn't explained so i could understand it. after i tried to explain why I thought it wasn't right it wasn't clarified. I'm sorry.
Re: when i go out back I get lags in control. if the lawn mower is going straight and it doesn't get the signal that i released the joystick it keeps going until it does.that's a show stopper. someone could get hurt .
Sorry, I am not following all of the minutiae of this discussion, but I found the above possibility extremely disturbing. Apologies, if I am taking it out of context, or I am stating the obvious below, but I hate the thought of someone being hurt, when that pain could have been avoided.
Of course, you should do everything reasonably possible to ensure the comms is adequate for the job, and I hope the main thrust of this thread is moving in that direction.
But if you are controlling a 'potentially dangerous' item, you should always assume that anything that CAN FAIL, WILL FAIL at some point ... possibly for a reason you have no effective control, such as a component failing.
Thus, I would suggest that the receive end should be continually monitoring for a flow of instructions ... and if that flow is interrupted or suffers a high error rate for more than a very short time (1 second maybe?) ... then the receive end should immediately change to a 'safe mode'.
In the case of a mower, I would guess the most obvious 'safe mode' would be 'immediate stop' -- some situations, like aircraft flight control, need a more creative 'safe mode'! The most appropriate action should be carefully considered in every case -- sometimes it is not the most obvious action.
Including such mechanisms is a crucial part of the design of any system whose failure could have dangerous consequences.
Of course, this might mean you need also to modify the transmitter end, to ensure it continually issues instructions, even when that instruction is only 'no change - keep going', but that is part of a safe system design.
You may also wish to modify the instruction formats. For example, ensure each instruction is protected by some form of 'check', (e.g. checksum, or better still a simple checking algorithm), to detect corrupted messages. Also, numbering each message, say by including a byte which increments in a clock-like 0..255, 0..255 fashion, enables the receiver to easily spot if a significant proportion of the messages are being lost.
Best wishes and stay safe, Dave
Has any one ever changed the channel, data rate and power level. It would probably be a piece of cake if I could find any examples to manipulate. I think I'm having wifi interference issues...I read there are 120 channels available for the nrf2401+ and wifi uses the lower ones.
// Initialize RadioManager with defaults - 2.402 GHz (channel 2), 2Mbps, 0dBm
somewhere I found some commands that looked like they would do this but I didn't know how to implement. Now I can't even find that page. I thought it was on https://www.airspayce.com/mikem/arduino/RadioHead/
This may (or may not) be your issue, but Bill did mention in his video about the use of a standard cable vs one that carries data for the USB port rather than just power... please check that out before making any drastic changes, as it *might* just be the issue - no guarantee 😉
I assure you Dave that the safety of my small trees and other small plants are in my best interest. Just kidding... this isn't a commercial application. it's kind of a toy that will be used on private property with no escape(for an rc pushmower). There is at minimum a 10ft tree line surrounding the playground area. Some sort of ack nack patty wack would be nice if it could be implemented. I was also considering one of those collision avoidance sensors I've seen on some robots. I'm just not that far into success just yet.
Thanks for your concerns and for reading...if you would like to know more about the project or would like to contribute let me know. at the beginning of this thread I uploaded the current RX TX INOs for everyone's viewing pleasure...
@frogandtoad Thank You, I will bear that in mind.
The current connections for SPI I was currently using stranded Cat 5e but it is difficult to keep the twisted pairs twisted with such short lengths, esp. on the nano where d13? is opposite the other 4 i/os. I will revisit the videos.
I realised that this was not commercial, but a huge number of avoidable accidents happen within the confinement of peoples own houses and gardens with the (mis)use of tools, etc. -- as I suspect any hospital Accident and Emergency Dept is likely to confirm.
And I had no idea how powerful or 'aggresive' your machine could be. Some decades ago, one of my father's work colleagues slipped on a slope, and had several toes cut off by his lawn mower whilst mowing his home lawn ... And you may have read recently about a chess machine that broke the child opponents finger whilst playing chess! Even I have never worried about being injured in playing chess .. though I have never played a robot! So perhaps I am bit over zealous in occasionally promoting a 'think safety' culture, but only because I don't like to think of people suffering.
So, obviously the decisions are all yours, but I hope that you didn't mind me butting into your conversation.
As for your project, I confess I get interested in too many things, and I'll continue to 'scan' the conversation. Plus, I might look at NRF comms stuff in the future ... but maybe leave my wife to push our lawn mower around manually, as she actually enjoys doing it!
Best wishes, and stay SAFE, Dave