loading
 
Timer variable in VBScript
Anonymous
15 year
I would like to write a VBScript file that will run the servo for 5 seconds if the camera detect a certain image in the middle of the screen. The green ball tracking script in the tutorial is very helpful. I just need to figure out how to active the servo for a predetermined period of time.

    if size > ballSize then
      left_motor = left_base+((size-ballSize)*2)
      right_motor = right_base+((size-ballSize)*2)

I would like the left and right motors to run for 5 seconds and stop once they are triggered.

Thank for your help,

Don
Anonymous 15 year
See

http://www.roborealm.com/forum/index.php?thread_id=2080#2

for a description on how to change variables (which will stop motors) after X seconds.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index