IMG_2527.JPGCarnival Game - Revisited

 

Our assignment was to make a board that interfaces an input device with an output device.

 

PCB Design and Fab

To remake the carnival game I decided to add a step response input to the hello LCD board.  I added the header and resistor in cad.py.  The screenshot is below and the .cad file is here.

IMG_2512.JPG

 

I then used Jonathan Ward’s mini PCB mill to mill out my board.  It worked great!

IMG_2513.JPGIMG_2514.JPGIMG_2515.JPGIMG_2516.JPGIMG_2518.JPG

 

After a light sanding with some fine grit sandpaper I went ahead and stuffed the board.

IMG_2520.JPG

 

The numbers on the 10-pin header in the .cad file correspond directly to the pin numbers on the back of the LCD.  You can see how they connect in the picture below.

IMG_2522.JPG

 

Programming

I loaded the original LCD code to make sure everything was working correctly before I started making changes.  For the first iteration I pulled off the resistor connected to the step response header, powered the PB2 pin and coded in an interrupt for when the PA7 pin flipped.  You can see the code here.  The LCD shows “Don’t touch the wires!” until the two wires touch and then it reads “You lose.  Start Over!”

IMG_2523.JPGIMG_2525.JPG

 

Here is the game!

IMG_2526.JPGIMG_2527.JPG