View Single Post
  #1   Spotlight this post!  
Unread 16-02-2009, 02:42
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
help with turret code

right now im attempting to write some code for our turret to scan back and forth across the field between two limit switched until a large enough target is seen. I just had one failed attempted in which I created a state machine using some boolean operators to modify the direction of the motor based on which of the two limit switches was hit and which direction the motor was last commanded to go. The motor flickered back and forth. I think it had something to do with passing the last motor command to a shift register for evaluation the next cylce.

I'm wondering if anyone has any suggestions that are simple that I can use? Only got a day left and really want to get our turret working for testing tomorrow. I'm sure that this has been done before.

One suggestion was to just stop the motor however I want the turret to "scan" back and forth across the field.

Suggestions much appreciated! Mahalo!
Reply With Quote