I just finished making a robot that runs standard program (see my blog post on "standard program" for more info on standard program) until the button is pressed. At which point it goes insane. It says uh-oh, goes backwards one way then the other 3 times, spins really really quickly, puts on a dizzy face for 1 second, and then goes back to a normal face.
The whole program is inside one massive loop, and the first thing that happens in that loop is, " put on a normal face" and " go forward". After that, it asks a question, "is the button being pressed?" if the answer is no, it asks "is the ultrasonic sensor picking up anything within 10 CM?" if no, it goes back to the start, puts on a normal face, and goes forward. bear in mind it is constantly asking these questions, so in effect, it runs standard program. Now, if the button is pressed, well i already described what happens.
I Hereby dub this robot:
The Insanity Button
here are some pictures and videos:
Comments