Introduction: Interactional Capsule Toy Machine

For a project at school, I decided to make a Capsule Toy Machine with a shooting game using an ardiuno as the operating system.

what you will need:

.two big pieces of cardboard

.some insulation Tape

.some capsule toys

.resistance 220 ohm x3 / 1k ohm x2 / 10k ohm x3

.nokia 5110 LCD x1

.led bulb x3

.light sensitive resistor(LSR) x3

.servo motor x1

.micro switch x2

.some Dupont Lines

Step 1: Circuit Diagram

You can watch the video first. Then you will know what are the materials for.

Servo motor is for locking the Capsule Toy Machine.

One microswitch is for the game machine to see if there is a dropped coin. If the coin drops, then the game starts.

The other microswitch is for Capsule Toy Machine to see if there is a dropped capsule toy. If the toy drops, then lock the Capsule Toy Machine again.

Led bulbs are for telling which LSR is the target.

Step 2: Nokia 5110 LCD

Download the library here: http://www.rinkydinkelectronics.com/library.php?id=44

Download LCD assistance here: http://en.radzio.dxp.pl/bitmap_converter/

Use Microsoft Paint to draw pictures (84x48) and save them as *.bmp

Use LCD assistance and convert the monochromatic bitmaps to data arrays.

add #include <avr/pgmspace.h> to your *.c


Step 3: Coding

I made a selection form, an animation for demonstration, and I also recorded the last 5 final scores to adjust the degree of difficulty of the shooting game. ( adjust the speed of changing targets )

You can download the code here

Step 4: Craft Time

Just make your own machine!

Make sure that none of the cables are interfering or shorting out.

Have fun!