hey guys, lets say i wanted to run something only once when something happens… like if a ping)))) US detector references an object at a certain range infront of it… say 1 foot… then what would i use to make a servo move a certain amount, then stop… and then continue on with other code
so i was thinkign an if statement, but how would i let it run only once - e.g. i roll a “car” towards a wall with the setup described above, and the car’s “brakes” must kick in when the sensor finds an object 10 cm away from it?
by “brakes” i mean have a servo turn 1/4 a turn, for simplicity sake…
pls help… need to know :-?