Notifications
Clear all

How Can I modify this code to Control two or more servo motors using the nrf24l01 Module With These codes ?

69 Posts
2 Users
0 Likes
20.8 K Views
Gulshan
(@gulshan)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

Yes! Yes! Yes! Servos are responding. I just changed the nrf connections on both sides from 8 and 10 to 9 and 10. now it is working ? 


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@gulshan

My head is spinning, post the working files!!


   
ReplyQuote
Gulshan
(@gulshan)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

@pugwash

Ok so the previous one that I tried Worked

and this one that you sent me now both transmit and Receive code are working.

 


   
ReplyQuote
Gulshan
(@gulshan)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

I just ordered the arduino mega from bangood.com Once I get it I will modify these code for it to control 6 Servos.


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

   
ReplyQuote
Gulshan
(@gulshan)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

@pugwash

Yup it is also working. ? 


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 
Posted by: @gulshan

@pugwash

Yup it is also working. ? 

Ahhhh! Great!

I can't find an Emoji for breathing a heavy sigh of relief ? 

What have we learned today?

  1. You cant mess around with the pins of the NRF24L01.
  2. Servos need PWM pins
  3. Arduino Uno only has three usable PWM pins i.e only three servos can be controlled directly.
  4. When altering code, only alter one thing at a time and test thoroughly before moving on. 

Anything else?

But I can see a method of controlling more servos from an Arduino Uno using a CMOS multiplexer, but I am not going there!


   
ReplyQuote
Gulshan
(@gulshan)
Member
Joined: 4 years ago
Posts: 127
Topic starter  

@pugwash

Thank You Very Much ? 


   
ReplyQuote
Page 5 / 5