Recommendations
Use Moore machines
- One-hot encoding
- Output encoding
Example: Shift register for heading
- N: 0001
- W: 0010
- S: 0100
- E: 1000
- Rotate left when turning left; right when turning right
Example: Counters for X, Y
- Move horizontally: Either increment or decrement X
- Move vertically: Either increment or decrement Y