FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to program a color sensor?

Hello All,

My team needs some help on programming in a while loop. We want our robot to move forward until it senses a blue or red line. We have tried using a while loop and placing our motors at a constant sleep and connected it on the outside with stop motor block. Also we have a hitechnic color senor and we want to understand how to write a "or" code where it can detect a red or blue line and then stop. Thanks so much for the help!

Sincerely,

N.E.R.D.S. (Northeast Robotics Development Specialist)

Team #6552

0 Kudos
Message 1 of 3
(6,098 Views)

Which color sensor are you using?  Can you post your code?

Have you tried to just use the "wait for" VI?  That may be simpler for you to use. 

0 Kudos
Message 2 of 3
(5,157 Views)

Sorry for the late response but the wait for VI worked. Thanks for the help!

0 Kudos
Message 3 of 3
(5,157 Views)