View Single Post
  #9   Spotlight this post!  
Unread 29-01-2011, 20:39
wazcodez's Avatar
wazcodez wazcodez is offline
Registered User
AKA: Megh Suthar
FRC #2076 (Blackscots)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2008
Location: Toronto
Posts: 19
wazcodez is infamous around these partswazcodez is infamous around these parts
Send a message via MSN to wazcodez
Re: Line Tracking Photoswitch Info and Demo Video

Quote:
Originally Posted by Ethan Spitz View Post
I would start out by making a handwritten flow chart saying what you want it to do when each sensor is triggered. For example, when the left sensor is triggered, make it go right, and when the right sensor is triggered, go left. When neither are triggered, go straight.

Just use nested case statements and use the DIO ins to be the input for the case statements

Ethan
Thanks for replying, should i control motor inside the nested loop or change the value for x or y inside the loop ? which will be sufficient enough and how do i know tht i have reached the "Y" part, i just started the programming ... ?

thanks for your help, will lwt you know if i have any problems ... thanks
__________________
" When you copy from one source it's called plagiarism when u copy from multiple it's Research .. ! " - Megh Suthar
Reply With Quote