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 #284 background imageLoading...
Page #284 background image
page. If you click it, Chrome will open a console for the background page.
Also, it automatically creates another link next to it, pointing to the applica-
tions main page. If you click this link, youll get access to all of your applica-
tions innardsthat is, youll get a JavaScript console for your running Chrome
App.
Because our first Chrome apps manifest requests permission for accessing
the serial port, you can use Chromes serial API
6
in the applications JavaScript
console.
The following function prints the paths to all serial devices connected to your
computer (to enter multi-line functions in the JavaScript console, press
Shift+Enter at the end of each line):
chrome.serial.getDevices(function(devices) {
devices.forEach(function(d) {
console.log(d.path);
})
});
On my machine this function outputs the following:
/dev/cu.Bluetooth-Incoming-Port
/dev/tty.Bluetooth-Incoming-Port
/dev/cu.Bluetooth-Modem
/dev/tty.Bluetooth-Modem
/dev/cu.usbmodem24321
/dev/tty.usbmodem24321
The last two lines represent the serial port connected to my Arduino. With
the following statement you can connect to the Arduino from the JavaScript
console:
chrome.serial.connect(
"/dev/tty.usbmodem24321",
{ bitrate: 38400 },
function(c) { console.log(c) })
chrome.serial.connect
expects three arguments. The first is the path to the serial
port to connect to. With the second argument, you can specify typical options
for serial ports, such as the baud rate (named
bitrate
in this case) or the parity
bit. Eventually you have to pass a callback function that gets called after
Chrome tries to establish the connection.
6.
https://developer.chrome.com/apps/serial
Appendix 4. Controlling the Arduino with a Browser 272
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