View Single Post
  #4   Spotlight this post!  
Unread 28-03-2011, 21:38
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: timing in program

Here's one way to do what you asked. The first frame of the flat sequence will wait for 5000 milliseconds before completing and letting the second frame begin. The second frame contains a while loop that will terminate after 101 iterations, with each iteration setting the motor speed and waiting for 50 milliseconds. The final frame of the sequence turns the motor off.

Using a flat sequence is overkill for something this simple, but it provides a framework for adding more steps if desired.
Attached Thumbnails
Click image for larger version

Name:	example.jpg
Views:	37
Size:	32.9 KB
ID:	10499  
Reply With Quote