View Single Post
  #1   Spotlight this post!  
Unread 01-03-2016, 20:37
apm4242 apm4242 is offline
Registered User
FRC #4242
 
Join Date: Jan 2013
Location: United States
Posts: 80
apm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud ofapm4242 has much to be proud of
Using a Gyro without Encoders

Hello. This is the first year we have attempted using gyros, PID, and while loops to navigate in autonomous. I think I have it right and the code does seem to work properly (I'm using a test bed as the robot is currently bagged) but I could use a second opinion to tell me if I'm doing anything wrong.

The routine is supposed to drive straight for a certain time, turn 60 degrees towards the low goal, drive straight for a certain time, and shoot the boulder. It uses a flat sequence structure with while loops in the frames that require iterative functions.

1. Resetting the gyro - Does this require some time or is it instantaneous? Where is the best place to reset this?
2. Reading gyro data - Does gyro data need to be read in each separate while loop?
3. Using wait.vi and loop iterations to keep time - I set the loop to iterate every 10 ms and to terminate when it reaches 500 iterations. I assume this will be 5 seconds. Is there any reason this would not be 5 seconds? Is there a better way to do this?

Any help is appreciated!
Attached Thumbnails
Click image for larger version

Name:	4242_Auto_Gyro_2016.png
Views:	78
Size:	89.4 KB
ID:	20240  
Reply With Quote