Shop OBEX P1 Docs P2 Docs Learn Events
Servos, Joysticks and VB6 topic — Parallax Forums

Servos, Joysticks and VB6 topic

sumguy16sumguy16 Posts: 21
edited 2004-07-26 13:03 in BASIC Stamp
I though I would start this topic out.
Right now I can control up to 6 servos or motors via VB6 and SERIN.
It really bogs down though when all of the servos or motors are moving.
What is more efficient than using SERIN with WAIT.·
This is the simple version I use for just two servos:

SERIN·16, $4096, [noparse][[/noparse]WAIT("@"), DEC1 direction, WAIT("T"),DEC3 steering].

Thanks,
Adamjumpin.gif

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-07-26 13:03
    Since servos want to be updated every 20 ms or so, you may want to keep an array with current possition values. Then you can use a timeout with SERIN so that if nothing arrives in 20 ms your servos will be refreshed with their current values. This is a**uming that your VB program is sending the control string in one fell swoop. Using a timeout would not be workable if you were entering possition data through a terminal.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
Sign In or Register to comment.