angleVar var word 'set up constants with the minimum and maximum pulse widths minAngle con 1645 'minimum value to which the HiTech ultra torque HS-5645MG servo's will respond to settin their position to 0 degrees maxAngle con 4400 'maximum value to which the HiTech ultra torque HS-5645MG servo's will respond to settin their position to 180 degrees 'set up a constant with the time between pulses: refreshPeriod con 20 'set an initial pulsewidth: angleVar = minAngle Main: 'take the servo output pins low Low 0 Low 1 'pulse the servo pins PulsOut 0, angleVar PulsOut 1, angleVar 'pause: pause refreshPeriod 'change the anlge for the next time around if angleVar > maxAngle Then angleVar = minAngle else angleVar = angleVar + 5 endif GoTo main