... so I found a fix. I changed the line code below
Servo myservo[6];
To Be
Servo myservo[8];
The old code was parsing 6 integer location for the servos. Then because the loop is bonded to begin from 2, then no matter what the upper bound is, it will just count 4 times. That is why servo counts after 4 do not receive any signal.
Hi,
It seems like you need to consider where you went wrong conceptually. From your code it seems that you had mixed up the array indexer with the servo pin that you want to attach to. You really need to loop from 0 to -1. This will allow you to keep your array at the correct size instead of having to add extra positions to it.
Now that your array and loop are in synchronization with each other, you need to correctly attach the pin to the servo. Since your pins start at 2, you could do one of two things to handle the issue:
Declare another int that is initialized to 2 and increment it along with the loop (name it something like currentPin) and attach the servo using this variable. (this type of code is more self documenting and the extra variable really doesn't waste that much space, it probably takes less space than the extra unneeded array positions)
Do some magic number mathematics involving the loop counter to get the difference between 0 and the first pin then attaching the servo based on that. I don't really like this method because it is slightly unclear what is happening and it looks like magic numbers even though there is a reason for it.
Anyhow sorry if I am butting in, I have just made this type of mistake before and it always helps me to think about what the root of the problem is.