Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Internet of Things with Arduino Blueprints

You're reading from  Internet of Things with Arduino Blueprints

Product type Book
Published in Oct 2015
Publisher
ISBN-13 9781785285486
Pages 210 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Pradeeka Seneviratne Pradeeka Seneviratne
Profile icon Pradeeka Seneviratne

Table of Contents (15) Chapters

Internet of Things with Arduino Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Internet-Controlled PowerSwitch 2. Wi-Fi Signal Strength Reader and Haptic Feedback 3. Internet-Connected Smart Water Meter 4. Arduino Security Camera with Motion Detection 5. Solar Panel Voltage Logging with NearBus Cloud Connector and Xively 6. GPS Location Tracker with Temboo, Twilio, and Google Maps 7. Tweet-a-Light – Twitter-Enabled Electric Light 8. Controlling Infrared Devices Using IR Remote Index

Adding a Cascade Style Sheet to the web user interface


Cascade Style Sheet (CSS) defines how HTML elements are to be displayed. Metro UI CSS (https://metroui.org.ua/) is a cascade style sheet that can be used to apply Windows 8-like style to your HTML elements.

The following Arduino sketch applies Windows 8-like style to the radio button group:

  1. Open your Arduino IDE and paste the code from the sketch named B04844_01_05.ino from the code folder of this chapter.

  2. Between the <head></head> tags we have first included the JQuery library which consists of a rich set of JavaScript functions:

    client.println("<script src=\"https://metroui.org.ua/js/jquery-2.1.3.min.js\"></script>");
  3. Then, we have included metro.js and metro.css from the https://metroui.org.ua website:

    client.println("<script src=\"https://metroui.org.ua/js/metro.js\"></script>");
    client.println("<link rel=\"stylesheet\" href=\"https://metroui.org.ua/css/metro.css\">");

Upload the sketch on your Arduino board and play with the new look and feel. You can modify the other HTML elements and even use the radio buttons by referring to the MetroUI CSS website documentation at https://metroui.org.ua/.

MetroUI CSS style applied to radio buttons

You have been reading a chapter from
Internet of Things with Arduino Blueprints
Published in: Oct 2015 Publisher: ISBN-13: 9781785285486
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}