Amazing code to control a servo only with a push button very easy

because in this case

 if(radio.available()){
   radio.read(&boolarr[0], sizeof(boolarr[1]));
   if (boolarr[0] == HIGH) {
    Serial.println(" Recived This is button 1");
    rot = rot + add;
   myServo1.write(rot);
   radio.stopListening();
   }
   
  radio.startListening();
   radio.read(&boolarr[1], sizeof(boolarr[1]));
   if (boolarr[1] == HIGH){
     Serial.println("This is button 2");
     rot = rot + add;
     myServo2.write(rot);
   }
  }
}

i tried removing one and the thing worked and i removed the 1st one and kept the second one the thing worked. But when i put both together both move at the same time

That's an interesting construct.
What is connected to pins zero and one?

(You may wish to change the misleading topic title)

Seems like you want to continue independently and not "show your hand". I have no problem with that. Good luck with your project.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.