SlideShare uma empresa Scribd logo
1 de 18
2013.10.05 GDG Hyderabad DevFest
Using Chrome Serial API with Arduino
(Integrating Chrome with Embedded Systems)
2
Syed Anwaarullah
Agenda
• Introduction
• Demo
• Implementation
• Q&A
3
My two cents…
4
How many side does a coin have?
Software Hardware+ =
∞
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
What is…
No. Slide
IoT…
No. Slide
Where does Chrome Stop?
7
Chrome Browser is…
• _______________
• _______________
• _______________
Is that all? Should we stop here?
Fastest
Secure
Most popular
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
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
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
Lets build an IOT device using Chrome Serial API and Arduino
11
The UML aka Circuit Diagram
Demo…
12
Demo
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
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…
Dissecting the Arduino Code
15
setup()  Initialization
loop()  Super loop, no exit
Serial  Serial Communication Library
Q&A
16
17
“Using Chrome Serial API with Arduino”
Thank you! 
Source Code:
Syed Anwaarullah
Blog: http://anwaarullah.com
Email: syed@anwaarullah.com
Mobile: 0990-88-777-64
About Me:
• Java, GWT, MS CRM; 3+ yrs
• Open Source H/W S/W advocate
• Electronics Engineer - Education
• Hardware – Software Integrator
• Android, LeapMotion, Raspberry
Pi, Robotics, AI, 3D
Printing, Embedded
Electronics, IoT etc…

Mais conteúdo relacionado

Semelhante a GDG Dev Fest - Hyderabad - Using Chrome Serial API with Arduino

Compilation Of C/C++ program in Android
Compilation Of C/C++ program in AndroidCompilation Of C/C++ program in Android
Compilation Of C/C++ program in Androidrahulverma1080
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011sullis
 
Hacking with the Raspberry Pi and Windows 10 IoT Core
Hacking with the Raspberry Pi and Windows 10 IoT CoreHacking with the Raspberry Pi and Windows 10 IoT Core
Hacking with the Raspberry Pi and Windows 10 IoT CoreNick Landry
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15sullis
 
Mob324 Windows IoT Core Dave Glover Microsoft Australia
Mob324 Windows IoT Core Dave Glover Microsoft AustraliaMob324 Windows IoT Core Dave Glover Microsoft Australia
Mob324 Windows IoT Core Dave Glover Microsoft AustraliaDave Glover
 
Internet of Things & Co.
Internet of Things & Co.Internet of Things & Co.
Internet of Things & Co.Damir Dobric
 
Mobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDKMobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDKIntel® Software
 
Development of a mobile app for Android
Development of a mobile app for AndroidDevelopment of a mobile app for Android
Development of a mobile app for AndroidAlexJReid
 
Android (Types, Feature,Application etc..)
Android (Types, Feature,Application etc..)Android (Types, Feature,Application etc..)
Android (Types, Feature,Application etc..)Coder Tech
 
Engineering and Industrial Mobile Application (APP) Development
Engineering and Industrial Mobile Application (APP) DevelopmentEngineering and Industrial Mobile Application (APP) Development
Engineering and Industrial Mobile Application (APP) DevelopmentLiving Online
 
ch4-Software is Everywhere
ch4-Software is Everywherech4-Software is Everywhere
ch4-Software is Everywheressuser06ea42
 
Tehran's 1st Android bootcamp - Part1
Tehran's 1st Android bootcamp - Part1Tehran's 1st Android bootcamp - Part1
Tehran's 1st Android bootcamp - Part1Mohsen Mirhoseini
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
CHIRIMEN open hardware became open source (English)
CHIRIMEN open hardware became open source  (English)CHIRIMEN open hardware became open source  (English)
CHIRIMEN open hardware became open source (English)Satoru Takagi
 
Internet of Things 101 - For software engineers
Internet of Things 101 - For software engineersInternet of Things 101 - For software engineers
Internet of Things 101 - For software engineersKashif Ali Siddiqui
 
Mobile Dev For Web Devs
Mobile Dev For Web DevsMobile Dev For Web Devs
Mobile Dev For Web DevsJustin James
 
Android Workshop
Android WorkshopAndroid Workshop
Android WorkshopJunda Ong
 

Semelhante a GDG Dev Fest - Hyderabad - Using Chrome Serial API with Arduino (20)

Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Compilation Of C/C++ program in Android
Compilation Of C/C++ program in AndroidCompilation Of C/C++ program in Android
Compilation Of C/C++ program in Android
 
Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011Android 3.1 - Portland Code Camp 2011
Android 3.1 - Portland Code Camp 2011
 
Hacking with the Raspberry Pi and Windows 10 IoT Core
Hacking with the Raspberry Pi and Windows 10 IoT CoreHacking with the Raspberry Pi and Windows 10 IoT Core
Hacking with the Raspberry Pi and Windows 10 IoT Core
 
Presentation1
Presentation1Presentation1
Presentation1
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15Android 3.0 Portland Java User Group 2011-03-15
Android 3.0 Portland Java User Group 2011-03-15
 
Mob324 Windows IoT Core Dave Glover Microsoft Australia
Mob324 Windows IoT Core Dave Glover Microsoft AustraliaMob324 Windows IoT Core Dave Glover Microsoft Australia
Mob324 Windows IoT Core Dave Glover Microsoft Australia
 
Internet of Things & Co.
Internet of Things & Co.Internet of Things & Co.
Internet of Things & Co.
 
Mobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDKMobile Web Apps and the Intel® XDK
Mobile Web Apps and the Intel® XDK
 
Development of a mobile app for Android
Development of a mobile app for AndroidDevelopment of a mobile app for Android
Development of a mobile app for Android
 
Android (Types, Feature,Application etc..)
Android (Types, Feature,Application etc..)Android (Types, Feature,Application etc..)
Android (Types, Feature,Application etc..)
 
Engineering and Industrial Mobile Application (APP) Development
Engineering and Industrial Mobile Application (APP) DevelopmentEngineering and Industrial Mobile Application (APP) Development
Engineering and Industrial Mobile Application (APP) Development
 
ch4-Software is Everywhere
ch4-Software is Everywherech4-Software is Everywhere
ch4-Software is Everywhere
 
Tehran's 1st Android bootcamp - Part1
Tehran's 1st Android bootcamp - Part1Tehran's 1st Android bootcamp - Part1
Tehran's 1st Android bootcamp - Part1
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
CHIRIMEN open hardware became open source (English)
CHIRIMEN open hardware became open source  (English)CHIRIMEN open hardware became open source  (English)
CHIRIMEN open hardware became open source (English)
 
Internet of Things 101 - For software engineers
Internet of Things 101 - For software engineersInternet of Things 101 - For software engineers
Internet of Things 101 - For software engineers
 
Mobile Dev For Web Devs
Mobile Dev For Web DevsMobile Dev For Web Devs
Mobile Dev For Web Devs
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 

Último

ingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet saucesingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet saucesJessicaEscao
 
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...JeylaisaManabat1
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfAmitRout25
 
The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)Shakti Savarn
 
Benefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBenefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBrantfordIndia
 
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls AgencyCall Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls Agencykojalkojal131
 
English basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfEnglish basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfbromerom1
 
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Mikko Kangassalo
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi OneDay18
 

Último (9)

ingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet saucesingrediendts needed in preparing dessert and sweet sauces
ingrediendts needed in preparing dessert and sweet sauces
 
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
Module-2-Lesson-2-COMMUNICATION-AIDS-AND-STRATEGIES-USING-TOOLS-OF-TECHNOLOGY...
 
integrity in personal relationship (1).pdf
integrity in personal relationship (1).pdfintegrity in personal relationship (1).pdf
integrity in personal relationship (1).pdf
 
The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)The 5 sec rule - Mel Robins (Hindi Summary)
The 5 sec rule - Mel Robins (Hindi Summary)
 
Benefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in IndiaBenefits of Co working & Shared office space in India
Benefits of Co working & Shared office space in India
 
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls AgencyCall Girls Dubai O525547819 Favor Dubai Call Girls Agency
Call Girls Dubai O525547819 Favor Dubai Call Girls Agency
 
English basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdfEnglish basic for beginners Future tenses .pdf
English basic for beginners Future tenses .pdf
 
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
Virtue ethics & Effective Altruism: What can EA learn from virtue ethics?
 
Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi Spiritual Life Quote from Shiva Negi
Spiritual Life Quote from Shiva Negi
 

GDG Dev Fest - Hyderabad - Using Chrome Serial API with Arduino

  • 2. Using Chrome Serial API with Arduino (Integrating Chrome with Embedded Systems) 2 Syed Anwaarullah
  • 3. Agenda • Introduction • Demo • Implementation • Q&A 3
  • 4. My two cents… 4 How many side does a coin have? Software Hardware+ = ∞
  • 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
  • 18. 17 “Using Chrome Serial API with Arduino” Thank you!  Source Code: Syed Anwaarullah Blog: http://anwaarullah.com Email: syed@anwaarullah.com Mobile: 0990-88-777-64 About Me: • Java, GWT, MS CRM; 3+ yrs • Open Source H/W S/W advocate • Electronics Engineer - Education • Hardware – Software Integrator • Android, LeapMotion, Raspberry Pi, Robotics, AI, 3D Printing, Embedded Electronics, IoT etc…