Shop OBEX P1 Docs P2 Docs Learn Events
8 servo's Basic Stamp2 and PSC — Parallax Forums

8 servo's Basic Stamp2 and PSC

GreenGiant83GreenGiant83 Posts: 43
edited 2006-09-16 19:42 in BASIC Stamp
I want to control 8 servo's using a parallax servo controler.· I wrote the following code to move all the servo's at the same time.· The problem I am having is that between the first and the last servo theres a bit of a delay, aprox. a second or so.· I want to know if there is anyway I can get the delay down to being unnoticable.

DO
  pos = 1200
  GOSUB SetPos
  PAUSE 1000
  pos = 300
  GOSUB SetPos
  PAUSE 1000
LOOP
SetPos:
  FOR i = 0 TO 7
    SEROUT sdat, baud+$8000,[noparse][[/noparse]"!SC", i, ra, pos.LOWBYTE, pos.HIGHBYTE, CR]
  NEXT
RETURN
Sign In or Register to comment.