Tuesday, November 11, 2008


Heres our code. Wish us luck for our Competition tomorrow :)


well to start the rules said that we have to wait 5seconds soo we added a clock of 5secs, this made our robot wait until the time was over. we now want to loop everything else that we program so were gonna put a loop in and every thing else inside it. for our robot not to fall out of the ring we had to add a light sensor. we added a motor program so it would reverse when it senses white ring. we had to see what the brightness of the reflection of white was soo we got the robot nxt to sense the percentage of the reflected light by placing the robot onto the black parts and on the white ring. the result was that black only reflected 20% and white 50%. We calibrated the lightsensor to 25 so when the reflected light level is higher than 25 it reverses. the button program was pritty easy to do we chose the bumped selection, if it is to be bumped it will reverse as you can tell becouse of the motor program in the side of the button program. now we need to add the sonic sensor we put it inside the buton progam so if the button isnt pressed it will do the sonic sensor program. when the robot senses another robot it will go towards it and try push it off the arena other than that it will rotate and till it senses another object to make sure that it wouldnt sense another object than the other robot we measured the arena and programmed it to sense things within a range of 50cm

No comments: