Hi there,
I'm trying to control the speed of a servo connected to the SD21 21 channel servo controller module (containing the PICAXE 18X) using Basic. The documentation that comes with the SD21 (http://www.robot-electronics.co.uk/htm/sd21tech.htm) says it is possible to control the speed, but doesn't say how. I've looked everywhere for code or hints about how to do this, but can't find anything. Is there anyone out there who could give me a few lines of code demonstrating this (or change the example code below?):
Servo1 = 63 ' servo 1 base register
Servo1p = 84 ' servo 1 positive offset register
Servo1n = 105 ' servo 1 negative offset register
Base = 128 ' centre position
Offset = 50 ' +/- 50 from centre position
ProgStart:
i2cslave $c2, i2cslow, i2cbyte ' setup i2c port for servo controller
writei2c Servo1, (Base)
Loop:
writei2c Servo1p, (Offset)
pause 300
writei2c Servo1n, (Offset)
pause 300
goto Loop
Any help would be much appreciated! Thanks in advance!
I'm trying to control the speed of a servo connected to the SD21 21 channel servo controller module (containing the PICAXE 18X) using Basic. The documentation that comes with the SD21 (http://www.robot-electronics.co.uk/htm/sd21tech.htm) says it is possible to control the speed, but doesn't say how. I've looked everywhere for code or hints about how to do this, but can't find anything. Is there anyone out there who could give me a few lines of code demonstrating this (or change the example code below?):
Servo1 = 63 ' servo 1 base register
Servo1p = 84 ' servo 1 positive offset register
Servo1n = 105 ' servo 1 negative offset register
Base = 128 ' centre position
Offset = 50 ' +/- 50 from centre position
ProgStart:
i2cslave $c2, i2cslow, i2cbyte ' setup i2c port for servo controller
writei2c Servo1, (Base)
Loop:
writei2c Servo1p, (Offset)
pause 300
writei2c Servo1n, (Offset)
pause 300
goto Loop
Any help would be much appreciated! Thanks in advance!