Dual Servos with 08M

quethe

New Member
I was wondering if the 08M can run two servos in different positions at the same time, or if the internal timer will only allow one servo to be timed at a time.
Also, is there any conflicts with running the servo comand as well as serial in or out?
Thanks Much
Robin www.usuroboticsclub.com
 

BeanieBots

Moderator
Not tried the 08M but the 28X can certainly run 8 at the same time so I'd expect it to ne OK. Never tried it with serout. I'm sure there is something in the manual about which timed commands interact with each other.
 

Lucky Phil

New Member
I have got two servos working on an 08M in different direction and rotations on a camera controller i'm building (code with much help from hippy)
let me know if you want it and i'll post it
Philip
 

tarzan

Senior Member
For one week from the last download my Justbasic GUI will be available from Upload'r for camera control.
It's set on COM2 @ n2400 you'll be able to change the code to suit your self if you download Justbasic.

My setup uses a Tx 433MHz to send commands.

http://file.uploadr.com/4cad <A href='http://file.uploadr.com/4cad' Target=_Blank>External Web Link</a>

<code><pre><font size=2>' pin0 = Sertxd - PC '(output only)
' pin1 = LED '(input/output)
' pin2 = Servo U/D '(input/output)
' pin3 = Rx '(input only)
' pin4 = Servo R/L '(input/output)


Symbol command = b0


init:
dirs = %10110
gosub home

returnpoint1:
main:
pause 250
low 1
serin 3,n2400, (&quot;CAM&quot;),command
'sertxd (command,CR,LF) 'for testing only
high 1

if command = &quot;U&quot; then tiltup
if command = &quot;D&quot; then tiltdown
if command = &quot;L&quot; then panleft
if command = &quot;R&quot; then panright
if command = &quot;H&quot; then homesub
goto main

tiltup:
let b2 = b2 - 2 min 30 'my servo must be a little out of whack.
servo 2,b2
pause 50
goto main

tiltdown:
let b2 = b2 + 2 max 200
servo 2,b2
pause 50
goto main

panleft:
let b4 = b4 + 2 max 190
servo 4,b4
pause 50
goto main

panright:
let b4 = b4 - 2 min 20
servo 4,b4
pause 50
goto main

homesub:
gosub home
goto returnpoint1
home:
let b2 = 116 'preset position
let b4 = 106
servo 2,b2
servo 4,b4
pause 50
return </font></pre></code>

Adjust servo min &amp; max to suit your own.

Please make the proper connections when interfacing with your PC. Don't forget if using 08/08M input 3 a diode is required.

Edited by - tarzan on 1/12/2006 10:58:01 AM
 
Top