Need help with programming and connecting my rc remote control to Aduino

I am in deep water when it comes to programming Aduino

I have illustrated in the attached picture how I think the wires should be connected and the movement pattern I want

I want the Arduino to do the following:

when I activate channel 1 on the remote control, a snake movement sequence for all servos starts, the speed of the motion must be depending on the position of the control stick 1 on the remote control.

to turn right or left, I activate channel 2 where the servo one turns to the right or left according to the position of the control stick two on the remote control. the last 2 servos continues the snake motion sequence


greenshot

I want the Arduino to do the following:

You should settle, initially, for determining that you get one value when channel 1 is activated, and another when it is not.

When that works, add a check for a value for channel 2.

Then, it is up to you to determine how to move the servos to create "a snake-like movement".

Thanks for the reply

I've googled a bit and found a sketch that makes the movement I want.
Is there a kind soul who can tell me how I get it adjusted so that I can activate it via an RC remote control
Thanks in advance

Here is the code
By Boris Landoni

// ROBOFISH
// di Segatello Mirco
#include <Servo.h>
Servo Servo1, Servo2, Servo3; // create servo object to control a servo

int i, time, obstacle;
int pos1, pos2, pos3;
int pos1R, pos2R, pos3R;
int phase=45;
int velocity=2000;
int maxDeflexion=50;
int maxDefobs=50;
int actualTime;
float shift;
const int center1=75;
const int center2=90;
const int center3=105;
const int lostTime=3000;

void setup()
{
Servo1.attach(4);
Servo2.attach(3);
Servo3.attach(2);
pinMode(13, OUTPUT);
time=velocity/460;
shift=0;

}

void loop()
{
for (i=0; i<360; i++) {

pos1 = i+2*phase;
pos2 = i+phase;
pos3 = i;

if (pos1>359) pos1-=360;
if (pos2>359) pos2-=360;
if (pos3>359) pos3-=360;

if (pos1>179) pos1=360-pos1;
if (pos2>179) pos2=360-pos2;
if (pos3>179) pos3=360-pos3;

pos1R=map(pos1,0,180,center1-maxDeflexion-obstacle,center1+maxDeflexion-obstacle);
pos2R=map(pos2,0,180,center2-maxDeflexion-obstacle,center2+maxDeflexion-obstacle);
pos3R=map(pos3,0,180,center3-maxDeflexion-obstacle,center3+maxDeflexion-obstacle);

Servo1.write(pos1R);
Servo2.write(pos2R);
Servo3.write(pos3R);
delay(time);

if (millis()>actualTime+lostTime) {
if (shift>0) shift=shift-0.05;
if (shift<0) shift=shift+0.05;
}
}
}