void Sequences(){

StartServoSeq10Part1Mapped= monServo1.readPosition();
StartServoSeq10Part1 =  mapf(StartServoSeq10Part1Mapped,0,1,0,180);
EndServoSeq10Part1Mapped = mapf(180,0,180,0,1);
if (EndServoSeq10Part1Mapped > StartServoSeq10Part1Mapped){
DistanceServoSeq10Part1 = ( EndServoSeq10Part1Mapped - StartServoSeq10Part1Mapped );}
else {DistanceServoSeq10Part1 = (StartServoSeq10Part1Mapped- EndServoSeq10Part1Mapped );}
SpeedSeq10Part1 = (DistanceServoSeq10Part1*10)/5;

StartServoSeq10Part2Mapped= monServo2.readPosition();
StartServoSeq10Part2 =  mapf(StartServoSeq10Part2Mapped,0,1,0,180);

EndServoSeq10Part2Mapped = mapf(90,0,180,0,1);
if (EndServoSeq10Part2Mapped > StartServoSeq10Part2Mapped){
DistanceServoSeq10Part2 = ( EndServoSeq10Part2Mapped - StartServoSeq10Part2Mapped );}
else DistanceServoSeq10Part2 = (StartServoSeq10Part2Mapped- EndServoSeq10Part2Mapped );
SpeedSeq10Part2 = (DistanceServoSeq10Part2*10)/5;

StartServoSeq10Part3Mapped= monServo1.readPosition();
StartServoSeq10Part3 =  mapf(StartServoSeq10Part3Mapped,0,1,0,180);
EndServoSeq10Part3Mapped = mapf(0,0,180,0,1);
if (EndServoSeq10Part3Mapped > StartServoSeq10Part3Mapped){
DistanceServoSeq10Part3 = ( EndServoSeq10Part3Mapped - StartServoSeq10Part3Mapped );}
else {DistanceServoSeq10Part3 = (StartServoSeq10Part3Mapped- EndServoSeq10Part3Mapped );}
SpeedSeq10Part3 = (DistanceServoSeq10Part3*10)/5;

StartServoSeq10Part4Mapped= monServo1.readPosition();
StartServoSeq10Part4 =  mapf(StartServoSeq10Part4Mapped,0,1,0,180);
EndServoSeq10Part4Mapped = mapf(0,0,180,0,1);
if (EndServoSeq10Part4Mapped > StartServoSeq10Part4Mapped){
DistanceServoSeq10Part4 = ( EndServoSeq10Part4Mapped - StartServoSeq10Part4Mapped );}
else {DistanceServoSeq10Part4 = (StartServoSeq10Part4Mapped- EndServoSeq10Part4Mapped );}
SpeedSeq10Part4 = (DistanceServoSeq10Part4*10)/5;

StartServoSeq1Part1Mapped= monServo1.readPosition();
StartServoSeq1Part1 =  mapf(StartServoSeq1Part1Mapped,0,1,0,180);
EndServoSeq1Part1Mapped = mapf(180,0,180,0,1);
if (EndServoSeq1Part1Mapped > StartServoSeq1Part1Mapped){
DistanceServoSeq1Part1 = ( EndServoSeq1Part1Mapped - StartServoSeq1Part1Mapped );}
else {DistanceServoSeq1Part1 = (StartServoSeq1Part1Mapped- EndServoSeq1Part1Mapped );}
SpeedSeq1Part1 = (DistanceServoSeq1Part1*10)/10;

StartServoSeq1Part2Mapped= monServo2.readPosition();
StartServoSeq1Part2 =  mapf(StartServoSeq1Part2Mapped,0,1,0,180);

EndServoSeq1Part2Mapped = mapf(90,0,180,0,1);
if (EndServoSeq1Part2Mapped > StartServoSeq1Part2Mapped){
DistanceServoSeq1Part2 = ( EndServoSeq1Part2Mapped - StartServoSeq1Part2Mapped );}
else DistanceServoSeq1Part2 = (StartServoSeq1Part2Mapped- EndServoSeq1Part2Mapped );
SpeedSeq1Part2 = (DistanceServoSeq1Part2*10)/10;

StartServoSeq1Part3Mapped= monServo1.readPosition();
StartServoSeq1Part3 =  mapf(StartServoSeq1Part3Mapped,0,1,0,180);
EndServoSeq1Part3Mapped = mapf(0,0,180,0,1);
if (EndServoSeq1Part3Mapped > StartServoSeq1Part3Mapped){
DistanceServoSeq1Part3 = ( EndServoSeq1Part3Mapped - StartServoSeq1Part3Mapped );}
else {DistanceServoSeq1Part3 = (StartServoSeq1Part3Mapped- EndServoSeq1Part3Mapped );}
SpeedSeq1Part3 = (DistanceServoSeq1Part3*10)/10;

StartServoSeq1Part4Mapped= monServo2.readPosition();
StartServoSeq1Part4 =  mapf(StartServoSeq1Part4Mapped,0,1,0,180);
EndServoSeq1Part4Mapped = mapf(0,0,180,0,1);
if (EndServoSeq1Part4Mapped > StartServoSeq1Part4Mapped){
DistanceServoSeq1Part4 = ( EndServoSeq1Part4Mapped - StartServoSeq1Part4Mapped );}
else {DistanceServoSeq1Part4 = (StartServoSeq1Part4Mapped- EndServoSeq1Part4Mapped );}
SpeedSeq1Part4 = (DistanceServoSeq1Part4*10)/10;


if (!Setupsequence){

Sequence1Servo.at(1000,Sequence1Part1);
Sequence1Servo.at(10000,Sequence1Part2);
Sequence1Servo.at(20000,Sequence1Part3);
Sequence1Servo.at(30000,Sequence1Part4);
Sequence1BServo.at(1000,Sequence1BPart1);
Sequence1BServo.at(1000,Sequence1BPart2);
Sequence1BServo.at(10000,Sequence1BPart3);
Sequence1BServo.at(10000,Sequence1BPart4);
Setupsequence= true;
}
if(CH6.momentaryPos() == 3)
{
Sequence1Servo.start(1);
}
if(CH6.Pos() == 3)
{
NeutralCtl= true;
}
if(CH6.momentaryPos() == 1)
{
Sequence1BServo.start(1);
}
if(CH6.Pos() == 2 )
{
NeutralCtl= false;
}
}
void Sequence1Part1 () {
monServo1.setSpeed(SpeedSeq1Part1);
if (monServo1.isStopped()) {monServo1.goTo(EndServoSeq1Part1Mapped);}
}
void Sequence1Part2 () {
monServo2.setSpeed(SpeedSeq1Part2);
if (monServo2.isStopped()) {monServo2.goTo(EndServoSeq1Part2Mapped);}
}
void Sequence1Part3 () {
monServo1.setSpeed(SpeedSeq1Part3);
if (monServo1.isStopped()) {monServo1.goTo(EndServoSeq1Part3Mapped);}
}
void Sequence1Part4 () {
monServo2.setSpeed(SpeedSeq1Part4);
if (monServo2.isStopped()) {monServo2.goTo(EndServoSeq1Part4Mapped);}
}
void Sequence1BPart1 () {
monServo1.setSpeed(SpeedSeq10Part1);
if (monServo1.isStopped()) {monServo1.goTo(EndServoSeq10Part1Mapped);}
}
void Sequence1BPart2 () {
monServo2.setSpeed(SpeedSeq10Part2);
if (monServo2.isStopped()) {monServo2.goTo(EndServoSeq10Part2Mapped);}
}
void Sequence1BPart3 () {
monServo1.setSpeed(SpeedSeq10Part3);
if (monServo1.isStopped()) {monServo1.goTo(EndServoSeq10Part3Mapped);}
}
void Sequence1BPart4 () {
monServo1.setSpeed(SpeedSeq10Part4);
if (monServo1.isStopped()) {monServo1.goTo(EndServoSeq10Part4Mapped);}
}
