View Single Post
  #1   Spotlight this post!  
Unread 03-03-2012, 14:57
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Driving based on range?

Hello -

I've written a quick snippet for Autonomous which should drive the robot at 0.65 until the rangefinder reads somewhere less than a given number. In this example, I've entered an arbitrary value of 60.

I've placed the drive within a loop, running every 20ms. Once the rangefinder reads a value less than 60, it is set to stop the While loop.

My question is do I need to feed the motors a value of 0 after the While loop is stopped, or don't I? See the attached image.

Thanks, Dom
Attached Thumbnails
Click image for larger version

Name:	cap.JPG
Views:	40
Size:	68.4 KB
ID:	12178  

Last edited by DominickC : 03-03-2012 at 15:01.
Reply With Quote