Quote:
Originally Posted by Ethan Spitz
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