Thread: pbasic question
View Single Post
  #3   Spotlight this post!  
Unread 11-01-2003, 14:35
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
you must only do one thing per cycle. for example...

Code:
py_1 = 127  'PWM 1 is set to neutral
py_1 = 254  'PWM 1 is set to full foward
py_1 = 0      'PWM 1 is set to full reverse

SEROUT [255,255,py_1,<var>,<var>,...]
in that example, the first PWM output would only output 0, because that's what it was last set to. the signal is only sent to the motors DURING the SEROUT command. anything changed before is not recognized, so you need something to count loops, so it goes straight for x cycles, then turns left, and so on. it's a bit more complicated, and i don't have anything done yet, and well, i'm still adjusting my mind to the backwards logic of PBASIC 2 (we don't have 2.5 yet, so 2 it is).
__________________
AIM --> Woloi
Email --> ian@woloschin.com