I wonder if somebody can help me.
I have just started to use NXT and am trying to program my Alpha Rex to detect a yellow ball and then move on. If the colour is not yellow,I want the Rex to rotate so that he drops the ball and then prompt me again for another ball.
Any advice will be great.
Simple loop for colour check
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: Simple loop for colour check
The Pseudo code would be something like this:
Start Loop
Check ball color
if ball is not yellow, drop ball
if ball is yellow, exit loop, otherwise, return to Start Loop
Do stuff with yellow ball
Does that help?
Steve
Start Loop
Check ball color
if ball is not yellow, drop ball
if ball is yellow, exit loop, otherwise, return to Start Loop
Do stuff with yellow ball
Does that help?
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Who is online
Users browsing this forum: No registered users and 0 guests