Hello. I'm using the PICAXE-28X2 with a servo attached to port 0. I am programming the picaxe with this block of code and it works like a charm to transfer it over and all:
The problem is that the servo doesn't start running. I try to re-plug the power cable and it moves a little bit before it stops and is dead.
Anyone knows what the problem is?
EDIT:
I am using an PICAXE28X2 Shield Base (AXE401) together with the Instant Robot Shield (AXE408).
I've set the base to 5V with a block and I've tried to feed everything with
1. A 4-slot battery box with 4 1.2V 2500mAh batteries (Portable). Just noticed that this gives a too small voltage output (4.8V)
2. A 600mA 230V->12V Adapter (Not portable)
The first method made the LED on the base light up fairly good. Method two made the LED light up probably at it's max, because I've read that 12V is the maximum ammount of voltage the PICAXE can take.
There are 7 regular slots and 5 A-slots (I am a beginner at this, so I'll call them that) on the Robot Shield. The servo is connected to the Robot Shield at regular slot 0 (White: Signal, Red: +, Black: -). I am almost totally certain that it should be that way. Or maybe I should try A0-A5?
UPDATE: It magically worked! I put the servo at slot 5 and re-programmed the PICAXE to...
...and it worked! But the question is why? Why on pin 5 and not on pin 0?
Code:
' TEST
servofun:
servo 0, 75
wait 2
servo 0, 225
wait 2
servo 0, 150
wait 2
goto servofun
Anyone knows what the problem is?
EDIT:
I am using an PICAXE28X2 Shield Base (AXE401) together with the Instant Robot Shield (AXE408).
I've set the base to 5V with a block and I've tried to feed everything with
1. A 4-slot battery box with 4 1.2V 2500mAh batteries (Portable). Just noticed that this gives a too small voltage output (4.8V)
2. A 600mA 230V->12V Adapter (Not portable)
The first method made the LED on the base light up fairly good. Method two made the LED light up probably at it's max, because I've read that 12V is the maximum ammount of voltage the PICAXE can take.
There are 7 regular slots and 5 A-slots (I am a beginner at this, so I'll call them that) on the Robot Shield. The servo is connected to the Robot Shield at regular slot 0 (White: Signal, Red: +, Black: -). I am almost totally certain that it should be that way. Or maybe I should try A0-A5?
UPDATE: It magically worked! I put the servo at slot 5 and re-programmed the PICAXE to...
Code:
' TEST
servofun:
servo 5, 75
wait 2
servo 5, 225
wait 2
servo 5, 150
wait 2
goto servofun
Last edited: