Hi,
depending how much picaxe juice you feed made the beetle run a few/a lot turns
You might be able to "tell" the beetle what to do, but he also wants some "food".
That's why a Servo has
three pins / wires. Two wires go to a battery or power supply to "do the work" (or feed the beetle). The third wire (from a PICaxe pin) is only a "control signal" to tell the Servo (beetle) what to do. Not only is the current from a PICaxe pin insufficient to "power" most motors, but the control signal is a short voltage pulse which won't supply any useful energy at all.
Sometimes it's even recommended to use separate batteries for the PICaxe and the Servo (to prevent electrical "noise" from the servo upsetting the PICaxe), but it's a common mistake to overlook that they do both need a "common earth". The first rule of electrical circuits is that they must be a "circuit" (i.e. paths/wires "to" and "from" the separate components).
As for how servos work, they basically use a hardware component called a "Comparator". The hardware can be quite complicated, but much the same can be done with a software loop, something like:
Code:
main:
IF requested_position[B] >[/B] actual_position THEN motorforwards
IF requested_position [B]<[/B] actual_position THEN motorbackwards
IF requested_position [B]=[/B] actual_position THEN motorstop
Lots of extra code is required of course; reading the "positions", controlling the motor, closing the loop, and probably calculating
requested_position - actual_position to determine and control how fast the motor is to rotate (the larger the "error", the faster it should rotate).
Cheers, Alan.