I have a list of tasks that the robot is set to do :
Placed anywhere on the mat, it should wander / move around looking for the start of the track
(indicated by the Turquoise block). It must avoid going off the mat onto the carpet.
• During the search it must ignore the track and any other coloured blocks.
• If an obstacle is detected off the line, the robot must move backwards a little, turn away from
the obstacle and start to search again for the start of the track.
• Once the start is found, it should follow the track till the end.
• If an obstacle is detected while following the line, the robot must move backwards a little,
and try to go around the obstacle to continue following the line.
I have managed to have most of the requirements under wraps Apart from the Obstacle avoidance (not to hard) and useing more colors that are pre-set.
I am indeed useing the colour sensor that comes with the NXT 2 kit as seen here: http://botbench.com/blog/wp-content/upl ... .jpg?w=250
My understanding when it comes to reading in values it gives: Red, Green, Blue, Value
"Value" is what im presumeing to be light values, i have tried adding them into the array and to be compared yet still it detects turquiose when on a white surface.
I have taken most of my readings when the robot is static and the values can jump around in a range for example:
blue: 492 - 541
Those are real reading, i cannot tell u for which colour they were taken but they did bounce around when on a single colour.
The Robot travels on tracks, causes it to vibrate much more then if it was on a set of wheels i may try altering the robot for a much smoother ride.
hmm im not sure if it does matter about the unsigned int, i would have expected it to behave the same with a bool value.
Just to say this, Im new to programing, this is my first real project with an NXT and so far causeing a headache.
Im very close to just buying the new color sensor and useing that in my project, and setting its values to the colors i want (if that possible, sure i read online that is it..).
thanks again for your help