Tiny Arcade With Mini (ANTI MISSILE ROBOT _part 3)

by David_Lin in Circuits > Arduino

529 Views, 1 Favorites, 0 Comments

Tiny Arcade With Mini (ANTI MISSILE ROBOT _part 3)

anti-mis3.jpg
5776365d67400c8af30000ce.jpeg

A video game !

the water-rocket robot is a player who playing against with arduino mini !

Metrial

575a8623937ddb66aa000111.jpeg
575a859a45bceb04c900117e.jpeg
anti_5.png
DIY the cost < 7.

Connecting Heart and Every Part of the Robot

575a68fb4fbade189800067a.jpeg
DSC_0235.JPG
mini_328P_1602.png

when the IIC displayer is working OK now,

#include LiquidCrystal_I2C.h

LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);

then replace and may remove the IIC interface and

update the program with:

#include LiquidCrystal.h

LiquidCrystal lcd(11, 9, 6, 5, 4, 3);

Embedding It Into a Cardboard Box

DSC_0238.JPG
575a6bb850e1b643e5000037.jpeg
575f3e064936d44a700001dc.jpeg

i placed a piece of wood thin board as the button table.

and i placed another piece of thin board to integrate

the mini and the lcd displayer as one single panel !

and i soldering the mini and the button and the displayer

......all together.

final, i embed them into a small cardboard box.

Coding

maybe there are someone wanna to know

how does it work?

i use the INT 0 (PIN 2) to pick the button signal,

attachInterrupt(0/*PIN_BUTTON*/, buttonPush, FALLING);

when it is falling to low(pressed)

then call ISR named buttonPush.

and because the sounds is extra-slow than light

300M/s .vs. 30000000M/s

so i use play melody first then draw the animate to sync.

mute = 1;

and i use mute to control the demo mode when user do not press the button,

it will automatic mute after user turn the power on.

and i use

delay(20);

in order to avoid the delay time to zero,

because 1/0 = divided by zero(error).

and then i use

delay(100-(distance/10));

for automatic speed controlling.

since the delay going to fewer

therefor the more the distance the more the speed ! !

upload the program and play now !

HAVE FUN !!

Test Drive

click me to show the circuit (Anti missile)

the more the scores(distance) the more the speed ! !

Coding

5760990b50e1b605c5000849.jpeg

i use the INT 0 (PIN 2) to pick the button signal,

attachInterrupt(0/*PIN_BUTTON*/, buttonPush, FALLING);

when it is falling to low(pressed) then call ISR named buttonPush.

and because sound is extra-slow than light

300M/s .vs. 30000000M/s

so i use play melody first then draw the animate to sync.

mute = 1;

and i use mute to control the demo mode

when user do not press the button, it will

automatic mute after user turn the power on.

and i use

delay(20);

in order to avoid the delay time to zero,

because 1/0 = divided by zero(error).

and then i use

delay(100-(distance/10));

for automatic speed controlling.

since the delay going to fewer,

the more the distance the more the speed ! !

upload the program and play now !

HAVE FUN !!

Downloads