EasyManuals Logo

Arduino uno User Manual

Arduino uno
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #133 background imageLoading...
Page #133 background image
</head>
<body>
<div id="game">
<div id="playfield">
<div id="paddle"></div>
<div id="ball"></div>
<div id="winner" class="message">
<p>You win!</p>
</div>
<div id="game_over" class="message">
<p>Game Over</p>
</div>
</div>
<div id="stats">
<div>Lives: <span id="lives"/></div>
<div>Score: <span id="score"/></div>
</div>
</div>
<audio src="sound/awake10_megaWall.mp3" autoplay loop/>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/serial_device.js"></script>
<script src="js/game_controller.js"></script>
<script src="js/arduinoid.js"></script>
</body>
</html>
Theres nothing special about this HTML document. At the top we associate
the document with a style sheet named
arduinoid.css
. Well specify all things
related to layout in this file.
Next, we define a couple of
<div>
elements. The main element has its
id
attribute set to
game
, and it contains all the other elements. Most elements
are fairly self-explanatory. The
playfield
element is where the action happens.
It hosts a
paddle
and a
ball
. These elements represent the games main
objectsthat is, the players paddle and the ball.
The
winner
and
game_over
elements contain messages well display in case the
player has won or lost the game. Theyll be invisible when the game starts.
In the
stats
element, you can find the games most important statistical infor-
mation: the number of lives left and the current score.
After that, we add a cool chiptune
3
created by Alex Smith
4
to the game using
the
audio
element. The
autoplay
attribute starts the song immediately, and the
loop
attribute makes it loop forever. Its a great song, so that doesnt hurt.
3.
http://opengameart.org/content/awake-megawall-10
4.
http://cynicmusic.com/
report erratum discuss
Creating the Game 115
www.it-ebooks.info

Table of Contents

Other manuals for Arduino uno

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino uno and is the answer not in the manual?

Arduino uno Specifications

General IconGeneral
Form factorArduino
CertificationRoHS, FC, CE
Processor model-
Processor frequency- MHz
Microcontroller modelATmega328
Microcontroller frequency16 MHz
DC input voltage7-12 V
Operating voltage5 V
DC current per I/O pin40 mA
Flash memory0.032 MB
Maximum internal memory- GB
SRAM (Static Random Access Memory)2 KB
EEPROM (Electrically Erasable Programmable Read-Only Memory)1 KB
Wi-FiNo
Number of analog I/O pins6
Number of digital I/O pins14
Weight and Dimensions IconWeight and Dimensions
Board dimensions53.4 x 68.6 mm

Related product manuals