text: Hi!
  I am trying to build hexapod using Arduino Mega. I have to control 18 servo motors. 3 in each leg of the robot. (Robot looks like the one in my profile display picture)
  I am having a little problem, whenever i use pins from 22 onward motors do not work properly, when i connected same motors on different pins (don’t remember exactly but i think 22, 27, 30) the motor attached to pin 27 was working. there is no error in the code.
  this is the code i wrote to test the working of 1 leg but only one motor out of three is working. i attached motors on pins 22, 25 and 28
  #include <MegaServo.h> int pos = 20; MegaServo Servo_1; MegaServo Servo_2; MegaServo Servo_3; void setup() { Servo_1.attach(22); Servo_2.attach(25); Servo_3.attach(28); } void loop() { Servo_1.write(pos); delay(15); Servo_2.write(pos); delay(15); Servo_3.write(pos); delay(15); }