This program makes liberal use of the fact that i can add extra cases for the switch block. i have 6 different "cases", 5 of which correspond to a button on the EV3, and the last one being the default case, where no button is pressed, there is no code there, it goes straight to the beginning of the loop. Due to the way this program is built, the "default" option is only used once; before ANY button is pressed.
This is because as soon as every other button on the EV3 is set to go until another button is pressed. at which it loops back to the beginning, goes to that buttons case, and runs that buttons code.
the buttons are mapped to code as follows:
-Left button makes it rotate very slowly left.
-Right button makes it rotate very lowly right.
-Forward button makes it go forward at max speed.
-The back button makes it go back at half speed.
I hereby dub this robot: Button Arrows
here are some pictures and videos:
Comments