The 4 pins on the left side are connected to the thrusters.
The two lower pin on the right determine the direction to move.
And the top right pin controls whether we are moving or not. So, I don't have to turn the power off to stop the robot.
I can stop moving, change tools, do whatever else I need to do, wire a new direction, and then start moving again. All without touching the robot power switch.
There are 4 combinations of input, and they correspond to the 4 directions of the game grid.
X Y Direction
0 0 SW
1 0 SE
0 1 NW
1 1 NE
There are other ways to arrange the logic, but this one is easy for me to remember.
If the X pin is hot, I am going RIGHT, otherwise I am going LEFT (positive or negative X)
If the Y pin is hot, I am going UP, otherwise I am going DOWN (positive or negative Y)
So, I am always moving along one of the diagonals, and in line with the game grid.
I use external logic to determine when to move, and how far. (see the 1-Shot circuit for an example)
- motion-control.png (255.61 KiB) Viewed 2674 times