This is the slides that were used to demo the concept of using the Chrome Serial API with an Arduino (Integrating Chrome with Embedded Systems) at the Google Developer Group Hyderabad DevFest, 5th Oct, 2013.
The source code is available at:
https://bitbucket.org/anwaarullah/chromearduino
5. What is…IoT?
5
•The Internet of Things is a computing concept where everyday
physical objects will be connected to the Internet
•They will also be able to identify themselves to other devices
•IoT describes a world where just about everything can be
connected and communicate in an intelligent fashion
8. Where does Chrome Stop?
7
Chrome Browser is…
• _______________
• _______________
• _______________
Is that all? Should we stop here?
Fastest
Secure
Most popular
9. Chrome Extensions
“Small Software programs that can modify and
enhance the functionality of the Chrome browser”
http://developer.chrome.com/extensions/index.html
• Little or No User Interface
• Essentially web pages and can use all APIs
provided by browser to web pages
• User downloads and installs them
• chrome.* APIs
• Extension has:
A manifest file, one or more HTML and JS files
8
10. Chrome Packaged Apps
9
“Packaged Apps deliver an experience as capable as a native app.
http://developer.chrome.com/apps/about_apps.html
• Written in HTML5, JavaScript, CSS
• Looks and behaves like a standalone web app outside the browser
• Have access to Chrome APIs and services not available to web
traditional web apps like interaction with Network and Hardware
devices, media tools etc
• chrome.serial API, chrome.bluetooth, chrome.usb
11. What is Arduino?
10
“Open-source electronic prototyping
platform allowing to create interactive
electronic objects
• USB-Serial Interface for
communicating with PC (uploading
code as well)
• Arduino code based on C/C++
• Thousands of libraries available
12. Lets build an IOT device using Chrome Serial API and Arduino
11
The UML aka Circuit Diagram
14. chrome.serial API
13
Use this API to read from and write to a
device connected to a serial port
chrome.serial API methods
• getPorts
• open
• read
• write
• close
15. Dissecting the Chrome App
14
Tells Chrome about the app, what it is, how to launch and permissions required
Create the event page responsible for managing app cycle
Contains UI elements; sliders, labels etc
Contains action listeners for the UI elements. Sends Serial data to Arduino using API
How to launch this app in Chrome…
16. Dissecting the Arduino Code
15
setup() Initialization
loop() Super loop, no exit
Serial Serial Communication Library