Internet of Things Programming with JavaScript

Learn the art of bringing the Internet of Things into your projects with the power of JavaScript
Preview in Mapt

Internet of Things Programming with JavaScript

Ruben Oliva Ramos

1 customer reviews
Learn the art of bringing the Internet of Things into your projects with the power of JavaScript

Quick links: > What will you learn?> Table of content> Product reviews

eBook
$22.40
RRP $31.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$22.40
$39.99
RRP $31.99
RRP $39.99
eBook
Print + eBook

Frequently bought together


Internet of Things Programming with JavaScript Book Cover
Internet of Things Programming with JavaScript
$ 31.99
$ 22.40
Smart Internet of Things Projects Book Cover
Smart Internet of Things Projects
$ 31.99
$ 22.40
Buy 2 for $35.00
Save $28.98
Add to Cart

Book Details

ISBN 139781785888564
Paperback298 pages

Book Description

The Internet of Things (IoT) is an entirely new platform for developers and engineers, but one thing that remains consistent as we move into this new world, are the programming languages. JavaScript is the most widely used language over the Internet, and with IoT gaining momentum, you will learn how to harness the power of JavaScript to interact with connected devices. This book will teach you how to interact with endpoint devices by developing web services in JavaScript and also set up an interface to control all connected devices.

This book begins with setting up a centralized web server that serves as a hub for all connected devices. The book then progresses further towards building web services to facilitate high-level communication between connected devices. Using Arduino and Raspberry Pi Zero as endpoint devices, the book will show you how devices can communicate with each other, perform a wide range of tasks, and also be controlled from a centralized location using JavaScript. The book ends with creating a hybrid app to control the devices that can be run from a browser or installed on a smartphone.

Table of Contents

Chapter 1: Getting Started with Raspberry Pi Zero
Setting up Raspberry Pi Zero
Connecting to the home network and accessing remotely
How to install the wireless tools
Testing the communication
Updating the package repository
Remote Desktop
Configuring a web server
Testing the PHP installation
Summary
Chapter 2: Connecting Things to the Raspberry Pi Zero
Connectting digital input - sensor DS18B20
Configuring the one-wire protocol
Connecting analog inputs using an MCP3008 ADC Converter
Raspberry Pi GPIO header
Connecting an RTC
DS3231 module setup
Testing the RTC
I2C device setup
Putting the real-time clock to final test
Summary
Chapter 3: Connecting Sensors - Measure the Real Things
Measuring flow sensor to calculate the volume of water
Reading and counting pulses with Arduino
Calculating water flow rate based on the pulses counted
Calculating flow and volume of water:
Measuring the concentration of gas
Measuring the level of alcohol with a sensor
Detecting fire with a sensor
Measuring the humidity for plants
Measuring the level of water in a recipient
Measuring temperature, humidity, and light and displaying data on an LCD
Detecting motion with a PIR sensor
Detecting if the door is open with a reed switch
Detecting who can get in the house with a fingerprint sensor
Summary
Chapter 4: Control-Connected Devices
Making a simple web server with Node.js
Controlling a relay from a Raspberry Pi Zero using Restful API and Node.js
Controlling the relay using aREST commands from a web browser
Configuring Node.js on a computer as a web server
Monitoring temperature, humidity, and light using Node.js with Arduino Wi-Fi
Monitoring temperature, humidity, and light using Node.js with Arduino Ethernet
Summary
Chapter 5: Adding a Webcam to Monitor Your Security System
Interaction between Arduino and Raspberry Pi
Arduino interface in Raspian
Controlling an output connected to Arduino from Raspberry Pi Zero
Controlling the Arduino board from Python
Connecting a TTL serial camera to Arduino and saving pictures to a micro SD
Detecting motion with the serial TTL camera
Controlling a snapshot from Raspberry Pi
Controlling your camera from a web page
Monitoring your USB camera for security in a network
Summary
Chapter 6: Building a Web Monitor and Controlling Devices from a Dashboard
Configuring MySQL database server
Installing PhpMyAdmin for administrating databases
Datalogger with MySQL
Data queries from the database
Controlling and dimming a LED
Controlling the speed of a DC motor
Controlling Lights with electrical circuits
Other appliances
Remote access from anywhere to your Raspberry Pi Zero
Controlling lights and measuring current consumption
Controlling and monitoring Arduino, Wi-Fi, and Ethernet shields on connected devices and sensors
Summary
Chapter 7: Building a Spy Police with the Internet of Things Dashboard
Spy microphone that detects noise
Regulating the current of an AC lamp dimmer
Controlling access with an RFID card
Detecting smoke
Building an alarm system using the Raspberry Pi Zero
Monitoring the climate from a remote dashboard
Summary
Chapter 8: Monitoring and Controlling Your Devices from a Smart Phone
Controlling a relay from a smart phone using APP Inventor
Creating our first application
Reading JSON response in Android Studio using ethernet shield
Android application
Controlling a DC motor using  an Android Application
Controlling outputs from android using your Raspberry Pi Zero
Controlling outputs with Raspberry Pi via Bluetooth
Summary
Chapter 9: Putting It All Together
Integrating the system - development projects
Solar power monitor circuit
Automatic irrigation system with a soil sensor
Arduino water-level controller
Bluetooth based home automation
Controlling access with a matrix keyboard
Controlling the door lock with a keypad
Integrating the system control with relays and devices
How to set up the power supplies
Summary

What You Will Learn

  • Develop the skills to connected devices prepared the field to interact with the devices in a network system Internet of Things
  • Find out how to connect sensors and actuators to the devices
  • Send data to a web server connected devices
  • Understand Internet of things using web services and database
  • Configure a dashboard using HTML5 and JavaScript
  • Control devices connected from a dashboard
  • Monitor different devices from the dashboard
  • Build an app for a smartphone to control different devices

Authors

Table of Contents

Chapter 1: Getting Started with Raspberry Pi Zero
Setting up Raspberry Pi Zero
Connecting to the home network and accessing remotely
How to install the wireless tools
Testing the communication
Updating the package repository
Remote Desktop
Configuring a web server
Testing the PHP installation
Summary
Chapter 2: Connecting Things to the Raspberry Pi Zero
Connectting digital input - sensor DS18B20
Configuring the one-wire protocol
Connecting analog inputs using an MCP3008 ADC Converter
Raspberry Pi GPIO header
Connecting an RTC
DS3231 module setup
Testing the RTC
I2C device setup
Putting the real-time clock to final test
Summary
Chapter 3: Connecting Sensors - Measure the Real Things
Measuring flow sensor to calculate the volume of water
Reading and counting pulses with Arduino
Calculating water flow rate based on the pulses counted
Calculating flow and volume of water:
Measuring the concentration of gas
Measuring the level of alcohol with a sensor
Detecting fire with a sensor
Measuring the humidity for plants
Measuring the level of water in a recipient
Measuring temperature, humidity, and light and displaying data on an LCD
Detecting motion with a PIR sensor
Detecting if the door is open with a reed switch
Detecting who can get in the house with a fingerprint sensor
Summary
Chapter 4: Control-Connected Devices
Making a simple web server with Node.js
Controlling a relay from a Raspberry Pi Zero using Restful API and Node.js
Controlling the relay using aREST commands from a web browser
Configuring Node.js on a computer as a web server
Monitoring temperature, humidity, and light using Node.js with Arduino Wi-Fi
Monitoring temperature, humidity, and light using Node.js with Arduino Ethernet
Summary
Chapter 5: Adding a Webcam to Monitor Your Security System
Interaction between Arduino and Raspberry Pi
Arduino interface in Raspian
Controlling an output connected to Arduino from Raspberry Pi Zero
Controlling the Arduino board from Python
Connecting a TTL serial camera to Arduino and saving pictures to a micro SD
Detecting motion with the serial TTL camera
Controlling a snapshot from Raspberry Pi
Controlling your camera from a web page
Monitoring your USB camera for security in a network
Summary
Chapter 6: Building a Web Monitor and Controlling Devices from a Dashboard
Configuring MySQL database server
Installing PhpMyAdmin for administrating databases
Datalogger with MySQL
Data queries from the database
Controlling and dimming a LED
Controlling the speed of a DC motor
Controlling Lights with electrical circuits
Other appliances
Remote access from anywhere to your Raspberry Pi Zero
Controlling lights and measuring current consumption
Controlling and monitoring Arduino, Wi-Fi, and Ethernet shields on connected devices and sensors
Summary
Chapter 7: Building a Spy Police with the Internet of Things Dashboard
Spy microphone that detects noise
Regulating the current of an AC lamp dimmer
Controlling access with an RFID card
Detecting smoke
Building an alarm system using the Raspberry Pi Zero
Monitoring the climate from a remote dashboard
Summary
Chapter 8: Monitoring and Controlling Your Devices from a Smart Phone
Controlling a relay from a smart phone using APP Inventor
Creating our first application
Reading JSON response in Android Studio using ethernet shield
Android application
Controlling a DC motor using  an Android Application
Controlling outputs from android using your Raspberry Pi Zero
Controlling outputs with Raspberry Pi via Bluetooth
Summary
Chapter 9: Putting It All Together
Integrating the system - development projects
Solar power monitor circuit
Automatic irrigation system with a soil sensor
Arduino water-level controller
Bluetooth based home automation
Controlling access with a matrix keyboard
Controlling the door lock with a keypad
Integrating the system control with relays and devices
How to set up the power supplies
Summary

Book Details

ISBN 139781785888564
Paperback298 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Smart Internet of Things Projects Book Cover
Smart Internet of Things Projects
$ 31.99
$ 22.40
IoT: Building Arduino-Based Projects Book Cover
IoT: Building Arduino-Based Projects
$ 63.99
$ 44.80
Practical Internet of Things Security Book Cover
Practical Internet of Things Security
$ 35.99
$ 25.20
Building Bots with Node.js Book Cover
Building Bots with Node.js
$ 31.99
$ 22.40
Analytics for the Internet of Things (IoT) Book Cover
Analytics for the Internet of Things (IoT)
$ 35.99
$ 25.20
Artificial Intelligence with Python Book Cover
Artificial Intelligence with Python
$ 39.99
$ 28.00