Continuous color sensor?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

Continuous color sensor?

Postby Calvinman » Tue Mar 06, 2012 2:55 am

I'm trying to make a Color Sensor on port 1 that will continuously look check for a color so that when it finds that color, it reacts in some way. Such as, when the color sensor sees red, the robot will turn right, or when the robot sees yellow, it will turn left. I just don't quite know how to make the color sensor continually get input without just using the getColorID method over and over. Can anyone give me some idea of how to do something like this? Thank you.

-Calvin
Calvinman
New User
 
Posts: 2
Joined: Wed Feb 01, 2012 4:06 am

Re: Continuous color sensor?

Postby foliot » Sat Mar 17, 2012 4:57 am

The way you described will work. Just keep checking what color the sensors are seeing.
foliot
New User
 
Posts: 17
Joined: Fri Mar 16, 2012 10:21 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff