problem at code making (mastermind)
Posted: 12 Feb 2012, 14:16
Hello everybody
Im 16 years old and my friends and I neen help on my school project.
We need to make a robot that propose a human thinking. we decided to make a robot who play "mastermind" in the position of the one who hides a code from the player.
We desinged a robot, that the input are 3 NXT buttons and 3 Touch sensors that represents the 6 colors, and the output is 2 lamps that propose the white and black pins.
now is the problem: we want to program it to read the inputs and put them in the variables, but we haven't find a way to write them corectly yet.
We tried to put 4 loops (of 4 positions for colors) of 5 seconds, that include "wait for sensor" and after him "write to variable". but we had a problem: if we want to stop the loop, 5 seconds must pass AND the loop must end, therefor we want to stop the loop in the middle of it somehow.
We need help by fixing the loops to work in the way we want, or another way to do this.
Thanks Alot!!
(im from israel so dont judge my english)
Im 16 years old and my friends and I neen help on my school project.
We need to make a robot that propose a human thinking. we decided to make a robot who play "mastermind" in the position of the one who hides a code from the player.
We desinged a robot, that the input are 3 NXT buttons and 3 Touch sensors that represents the 6 colors, and the output is 2 lamps that propose the white and black pins.
now is the problem: we want to program it to read the inputs and put them in the variables, but we haven't find a way to write them corectly yet.
We tried to put 4 loops (of 4 positions for colors) of 5 seconds, that include "wait for sensor" and after him "write to variable". but we had a problem: if we want to stop the loop, 5 seconds must pass AND the loop must end, therefor we want to stop the loop in the middle of it somehow.
We need help by fixing the loops to work in the way we want, or another way to do this.
Thanks Alot!!
(im from israel so dont judge my english)