Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things with Arduino Blueprints

You're reading from   Internet of Things with Arduino Blueprints Develop interactive Arduino-based Internet projects with Ethernet and WiFi

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785285486
Length 210 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Pradeeka Seneviratne Pradeeka Seneviratne
Author Profile Icon Pradeeka Seneviratne
Pradeeka Seneviratne
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Internet-Controlled PowerSwitch FREE CHAPTER 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/.

Adding a Cascade Style Sheet to the web user interface

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 €18.99/month. Cancel anytime