View Single Post
  #1   Spotlight this post!  
Unread 06-02-2012, 19:33
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
"Squaring" robot

Hello -

I've ran into a little bit of a roadblock. We've got two rangefinders - One on the left and one on the right of our robot. I am trying to read the values of both of them, and if the difference between them is not within an acceptable, predefined distance, move the drive motors accordingly to "square" the robot with the nearest wall.

Now, I've confirmed that the two Rangefinders are working, as I have a numeric readout within Teleop.vi. I've written this code into Pereodic.vi within a Flat Sequence Structure which is triggered by a joystick button press. Here's the odd part...If the rangefinders are within the difference defined, the sequence continues on to the next frame. However, if the rangefinders are NOT within the defined difference, nothing happens.

Any help/suggestions? Thanks.

EDIT - I attached a picture of the code in question. Anyone need it in a .vi?
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	66
Size:	107.5 KB
ID:	11763  

Last edited by DominickC : 06-02-2012 at 19:43.
Reply With Quote