Notifications
Clear all

nrf2401+ changing channel, data rate and power level with RadioHead ReliableDatagram & NRF24 Libraries

36 Posts
5 Users
1 Likes
1,171 Views
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@rclawn Just rename to .ino

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

the faster something happens the more likely it will be missed, or misunderstood?


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@rclawn It's the same, (object name) .setChannel(chan) it's the setChannel that is the key.

I have been a programmer for over 50 years and still type one finger at a time. most of the time a programmer is doing something other than coding, high speed typing is not needed, and may even be a detrimental skill, not enough time spent thinking about what they are doing.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

the original code for this project came from dronebot workshop youtube video. all i did was change stuff around and I needed help to do that.


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@rclawn That's really old, the file names are now .ino, just rename it.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

And I want to thank everyone who took the time to even look at my help requests this time and last.

Thank You all


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 
Posted by: @rclawn

the faster something happens the more likely it will be missed, or misunderstood?

While that may be true, you seem to not understand that a lowly UNO executes 16 Million instructions per second, but only needs to process 200,000 bytes of data at the fastest data rate an NRF24 can go. Now instructions are tricky, you might need one or you might need 4 to process a byte, but with a ratio of 80:1 I am very sure even a slow UNO can more than keep up with a relatively slow RF24 at its highest speed of 2Mbps. BTW, it has nothing to do with channel, after all the frequency is the 2.4Ghz band, which is 1,000 times the baud rate.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

my understanding was WiFi data is transmitted on the lower 20-30 channels of the 2.4ghz band? so if i can go higher like ch80 i may be able to avoid the 8+ WiFis near my house. maybe? the channel power level and bitrate are all listed in the defaults statement and i am kinda going on hearsay but it seems any one of those could impact performance. i have really good results inside the house with aluminum siding and a brick wall. 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 . it also makes it clumsy to turn about or maneuver or go straight on the hill(incline, maybe 10 or 15 degrees tops) .

I don't know for sure so im willing to try stuff to improve it. what I don't have is a bunch of extra money to buy more nrf24 boards, and i'm tired of resoldering connections and try to shorten them up.

on the pde file I really just needed the 3-4 lines of code after init...I think. we'll see. and as excited as I am to have something to try it's late, i'm tired and it's storming..more and I can't really even do a good test inside to see if it helps less to see if I break first try


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

just for the sake curiosity what do you suggest? shielding? 3.3 right off vunreg instead of 5v


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@rclawn That's a good idea re the wifi interference, I know about wifi interference as we had an issue here, but I didn't realize how it impacted these radios. Let us know how your test goes.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

@zander 

I was trying to share back.

I have chased my tail quite a bit on this project. bit by byte its coming together. this delay/lag is really the last major obsticle to trying this on the fancy lawn mower.

similar to https://www.craftsman.com/product/cmxgmam1125504/21-159cc-fwd-self-propelled-mower-v20-battery-start-m270


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@rclawn I think you are close too, just use that setChannel member to change the channel to something like 80 and give that a try. I think you already have that code in your sketch right?

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 
Posted by: @rclawn

just for the sake curiosity what do you suggest? shielding? 3.3 right off vunreg instead of 5v

I don't know who you were directing that question to, but my answer is 'not a clue' I have only been talking about the setChannel issue, software, nothing about hardware.

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3403
 

@rclawn @will actually gave you the information you needed in his first reply to you. I have attached the relevant part of that as a partial screen grab. Just specify the chan # as a normal base 10 number, the screen grab is using hex that you needn't worry about. For some unknown reason you mistakenly focused on the rest of that Stack Exchange discussion that had nothing to do with what you were looking for, that was just 'the boys' exercising their tech chops, your answer is in the attached screen grab. Simply replace radio with whatever your radio object name is (you posted it as RadioManager, and replace x125 with the chan # as in 80.

Screen Shot 2022 08 03 at 22.41.46

  

"Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon


   
ReplyQuote
RCLawn
(@rclawn)
Eminent Member
Joined: 1 year ago
Posts: 47
Topic starter  

@zander it was kinda mostly to you but i'm open to most suggestions, about the project...

you must understand a couple of things:

I have 2 sets of boards, one primarily for the mower and the other on a test fixture inside. 2 nanos, 2 unos 4 nrf24l01+ w/ adapters which i hate, 2 irf3205 dual 1/2 hbridge motor controllers and 2 pairs of power wheel ride on toy motor assemblies

I have at least 10 years in electronics engineering development but mainly as a technician, crazy mods component changes instrumentation and testing but never hardware or software development as my job. I always had someone telling me what they wanted done for the most part(im a soldering fool)

I generally say that I know enough to be dangerous, but its just a figure of speech. I am a peaceful person that is generally cautious first and innovative second(you dont want to let the magic smoke out of the prototype unless its destructive test...which can be exciting). HALT tests(highly accelerated life test) aren't nearly as much fun as blowing the electricity meter cover across the room w/ 480VAC or more.

making every ones neato toys work together for your own purposes can be challenging even when they are designed to do so


   
ReplyQuote
Page 2 / 3