The point of the maze game is to find a path out of the maze. David’s version used 4 LEDs to display the player’s immediate surroundings and provided 4 buttons to select which direction to move in. I decided to make my version a tiny bit more immersive. I more than doubled the screen resolution and added colour in the process by using nine WS2812 LEDs, and changed to a joystick for input. This actually reduced the number of pins needed, compared to David’s charlieplexed masterpiece. The PIC16F18313 chip I used is also an 8 pin device, like the original. The joystick push button functions as a reset button at present but reprogramming the PIC’s configuration can change that to a general purpose input. One pin remains free for adding either a speaker like David’s original or a vibration motor as used in a cell phone. I haven’t decided which to use yet. (For those keeping count, the 6th I/O pin seems to be lost in the process of configuring the chip’s sub-systems to generate the unusual serial data stream required by the WS2812s. See below for more.)

My other change is to the firmware. Using smart LEDs for the display and joysticks for input on an entirely different type of MCU obviously required new firmware but I also implemented view rotation and multiple mazes. Thus, the joystick allows movement forward and backward and turns to the left or right. Coloured pixels, all 9 of them, also allow for a richer view of the world. I chose blue for the walls, a yellow-gold colour for the player and green for the exit of the maze. Furthermore, the player flashes red upon collisions with the walls.”