Servo motors’ random rotation & infrared speed problem

Here’s my project I have working on for weeks, it’s due next MONDAY, it’s still have a lor problems, guys, please help me, please.

  • 6 pairs of 1-wires
  • 3 servo motors
  • 2 RGB LEDs
  • 2 infrared transceivers

Each pair of 1-wires is programmed into different states.
Head Servo motor 1 is controlled by the infrared transceivers. The speed is controlled by a pair of 1-wires.
A pair of Arm servo motors’ rotation speed and degree speed is controlled by a pair of 1-wires.
RGB LEDs’ color and blink duration is controlled by a pair of 1-wires.

Right now, the code able to recognize every 1-wire pin, and able to change RGB LEDs’ color when a pair of 1-wire is replaced.

But, the rest of sensors don’t function well.

  • Arm servo motors only rotate once and stopped. They could keep rotating randomly.
  • Head servo motor is moving too slow and keep vibrating.

here's my code: please see the attachment below, thanks.

final_5.ino (13.2 KB)

I have no idea what a "1-wire" is... if you post a schematic of your set-up, we might get an idea of what you're talking about. (I don't mean a photo of the thing, I mean a wiring diagram. You can draw it by hand and take a photo of that, that should do.)

Servo vibration is often a power-related thing: have you powered the servos from their own supply (ie not out of the Arduino 5V) and have you got enough current?- they can draw an amp or so. Are the servos man enough for the job of moving their load?