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 #282 background imageLoading...
Page #282 background image
native applications lifecycle, the Chrome environment controls a web appli-
cations lifecycle. It provides the web applications with important events, such
as alarms or signals.
The
background.js
file is where you connect your Chrome app to the Chrome
runtime environment. You can register for many events, but you at least have
to specify what happens when your application gets launched. Heres how
you can do that:
ChromeApps/SimpleApp/background.js
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create('main.html', {
id: 'main',
bounds: { width: 200, height: 100 }
});
});
The preceding file adds a new listener function to Chromes runtime environ-
ment. Specifically, it registers a listener function for the
onLaunched
eventthat
is, the function will be called when the Chrome app gets launched.
The listener opens a new Chrome app window by calling the
chrome.app.win-
dow.create
function. This function expects the name of an HTML document to
be opened and some optional arguments, such as the windows ID and its
bounds. For our first Chrome app, the HTML document looks as follows:
ChromeApps/SimpleApp/main.html
<!DOCTYPE html>
<html>
<head>
<title>My First Chrome App</title>
</head>
<body>
<p>Hello, world!</p>
</body>
</html>
These three files (
manifest.json
,
background.js
, and
main.html
) are all you need for a
basic Chrome app. In the next section, youll learn how to run the application
for the first time.
Starting the Chrome App
During development, itd be tedious to create zip archives every time you
wanted to try your latest changes to a Chrome app. Thats why the Chrome
browser supports the execution of unzipped applications. Point the browser
Appendix 4. Controlling the Arduino with a Browser 270
report erratum discuss
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