Robotic hand code

I have some problem in my code i don’t know what the value of the first servo keeps mix with the third and the fifth I don’t know why

Here’s my receiver code :-----

#include <RCSwitch.h>
#include <Servo.h>

Servo servo1;
Servo servo2;
Servo servo3;
Servo servo4;
Servo servo5;

RCSwitch myswitch = RCSwitch();

void setup() {




void loop() {
if (myswitch.available()){
  int value = myswitch.getReceivedValue();
  switch (value) {
    case 0 ... 180:{
    case 500 ... 680:{
      int value2=value-500;
    case 1000 ... 1180:{
      int value3=value-1000;
    case 1500 ... 1680:{
      int value4=value-1500;
    case 2000 ... 2180:{
      int value5=value-2000;

Please see attached photo.

Sorry for that i was using my phone

What values is your receiver receiving that affects multiple servos?

When i receive the first value the servo change to it after while it's changes by his own to another value . Tho i have all this ranges the servo is still not stable..

What values are you receiving? Give us some numbers and example behavior to work with.

First this is my transmitter code

#include <RCSwitch.h>

RCSwitch myswitch = RCSwitch();

int pot1 = A0;
int pot2 = A1;
int pot3 = A2;
int pot4 = A3;
int pot5 = A4;

void setup() {



void loop() {
int pott1 = analogRead(pot1);
pott1 = map(pott1,0,3023,0,180);
int angle1 = pott1;
myswitch.send(angle1, 10);

int pott2 = analogRead(pot2);
pott2 = map(pott2,0,3023,0,180);
int angle2 = pott2+500;
myswitch.send(angle2, 10);

int pott3 = analogRead(pot3);
pott3 = map(pott3,0,1023,0,180);
int angle3 = pott3+1000;
myswitch.send(angle3, 10);

int pott4 = analogRead(pot4);
pott4 = map(pott4,0,1023,0,180);
int angle4 = pott4+1500;
myswitch.send(angle4, 10);

int pott5 = analogRead(pot5);
pott5 = map(pott5,0,1023,0,180);
int angle5 = pott5+2000;
myswitch.send(angle5, 10);

And i attached my simulation…
And an example of what happened

The servo suppose to change through it’s potentiometer but i guess the other potentiometers affects the value of the servo too …
Like when i send 180 in the first potentiometer the servo give me 180 and change to 9 , 10 then go back to 180 and so on

You need to determine what numeric values the receiver is receiving. Print them to the monitor. Run some tests noting the values make just one servo move, and which values unexpectedly make multiple servos move.

Using RF without a packet checksum? Spurious random values will happen unless you use checksums to verify packets.