View Single Post
  #4   Spotlight this post!  
Unread 06-02-2012, 20:00
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
Re: "Squaring" robot

I've rewritten the code in a very minimal fashion, trying to make it as clear as possible while removing all superfluous actions.

I believe this should work. It's within a bunch of other code which runs every 20ms. Will I need to add a delay within the While loop?

When the rangefinders are within 5 to -5 inches of each other, I want to set all motor outputs to 0. How might I do that other than what I've got in this new image?

Thanks.
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	32
Size:	68.2 KB
ID:	11766  
Reply With Quote