万本电子书0元读

万本电子书0元读

顶部广告

Internet of Things Programming with JavaScript电子书

售       价:¥

2人正在读 | 0人评论 9.8

作       者:Rubén Oliva Ramos

出  版  社:Packt Publishing

出版时间:2017-02-01

字       数:49.5万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Learn the art of bringing the Internet of Things into your projects with the power of JavaScript About This Book This is a practical guide to help you configure and build a complete distributed IoT system from scratch using JavaScript Utilize the power of Node and HTML5 to develop web services and a centralized web server, enabling high-level communication between connected devices Control all your connected devices from the browser by setting up a common dashboard Who This Book Is For This book is for developers who are interested in learning how to communicate with connected devices in JavaScript to set up an IoT system. Some basic knowledge of JavaScript is expected. Hobbyists who want to explore the potential of IoT in JavaScript will also find this book useful. 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 In Detail 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. Style and approach This book offers step-by-step guidance on how to set up a distributed IoT system using JavaScript. It will teach you how to interact with endpoint devices by developing web services in JavaScript and also set up an interface for controlling all connected devices.
目录展开

Internet of Things Programming with JavaScript

Internet of Things Programming with JavaScript

Credits

About the Author

www.packtpub.com

Why subscribe?

Customer Feedback

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

1. Getting Started with Raspberry Pi Zero

Setting up Raspberry Pi Zero

Preparing the SD card

Installing the Raspbian operating system

Debugging your Raspberry Pi Zero with a serial console cable

Testing and accessing the serial COM interface

Connecting to the home network and accessing remotely

Connecting with an Ethernet adapter

Accessing the Raspberry Pi Zero via SSH

Connecting to the Wi-Fi network

How to install the wireless tools

Configuring IP address and wireless network

Testing the communication

Ping from a computer

Updating the package repository

Remote Desktop

Remote Desktop with Windows

Configuring a web server

Testing the PHP installation

Summary

2. Connecting Things to the Raspberry Pi Zero

Connectting digital input - sensor DS18B20

Hardware requirements

Hardware connections

Configuring the one-wire protocol

Software configuration

Displaying the readings on the screen

Connecting analog inputs using an MCP3008 ADC Converter

Raspberry Pi GPIO header

Reading the data with a Python script

Connecting an RTC

I2C setup

DS3231 module setup

Hardware setup

Testing the RTC

I2C device setup

Putting the real-time clock to final test

Summary

3. Connecting Sensors - Measure the Real Things

Measuring flow sensor to calculate the volume of water

Hardware connections

Reading the sensor signal

Reading and counting pulses with Arduino

Calculating water flow rate based on the pulses counted

Calculating flow and volume of water:

Displaying the parameters measured on an LCD

Measuring the concentration of gas

Connections with the sensor and Arduino board

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

Hardware and software requirements

Testing sensors

Displaying data on the LCD

Detecting motion with a PIR sensor

PIR sensor interfaced with Arduino

Detecting if the door is open with a reed switch

Detecting who can get in the house with a fingerprint sensor

Hardware configuration:

Save the fingerprint:

Testing the sensor

Summary

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

JSON structure

Commands with the aREST API

Installing Node.js on your Raspberry Pi Zero

Controlling the relay using aREST commands from a web browser

Configuring the web server

Configuring Node.js on a computer as a web server

Downloading Node.js

Installing Node.js

Configuring web server port 8080 with Node.js

Monitoring temperature, humidity, and light using Node.js with Arduino Wi-Fi

Connecting to the Wi-Fi network

Monitoring temperature, humidity, and light using Node.js with Arduino Ethernet

Code for the application of the Arduino Ethernet shield

Configuring the device in Node.js

Summary

5. Adding a Webcam to Monitor Your Security System

Interaction between Arduino and Raspberry Pi

Installing Arduino IDE in Raspbian

Remote access to Raspberry Pi

Executing Arduino in a graphical interface

Arduino interface in Raspian

Preparing the interface

Selecting the serial port

Downloading a sketch from the graphical interface

Controlling an output connected to Arduino from Raspberry Pi Zero

Controlling the Arduino board from Python

Hardware connections

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

Code for the function to take a picture

Controlling your camera from a web page

Calling the Python scripts from PHP

Code for Python scripts

Monitoring your USB camera for security in a network

Configuring Arduino YUN

Monitoring from the MJPG-STREAMER server

Monitoring the USB camera from the Raspberry Pi

Summary

6. Building a Web Monitor and Controlling Devices from a Dashboard

Configuring MySQL database server

Installing MySQL

Installing MySQL driver for PHP

Testing PHP and MySQL

Installing PhpMyAdmin for administrating databases

Configuring the Apache server

Entering to the phpMyAdmin remote panel

Showing the Arduinobd database

Sending data from Arduino and the Ethernet shield to the web server

Datalogger with MySQL

Programming the script software

Testing the connection

Data queries from the database

Software for the scripts

Scripts for specific data to be displayed

Query for recording temperature

Controlling and dimming a LED

Software requirements

Testing the LED

Controlling the LED from an interface

Controlling the speed of a DC motor

Controlling Lights with electrical circuits

Electrical appliances

Other appliances

Control a door lock

Control watering plants

Remote access from anywhere to your Raspberry Pi Zero

How to access our modem to configure it

Configuring Dynamic DNS

Creating an account at No-ip.org

Controlling lights and measuring current consumption

Building the interface to control and monitor

Installing Jade for Node.js

Interface for controlling and monitoring

Controlling and monitoring Arduino, Wi-Fi, and Ethernet shields on connected devices and sensors

Building the code to control and monitor devices from a single interface

Adding the devices to monitor and control

Summary

7. Building a Spy Police with the Internet of Things Dashboard

Spy microphone that detects noise

Software code

Regulating the current of an AC lamp dimmer

Hardware requirements

Software code

Controlling access with an RFID card

Hardware requirements

Software requirements

Software code

Detecting smoke

Software code

Building an alarm system using the Raspberry Pi Zero

Motion sensor with Raspberry Pi Zero

Software code

The alarm module

Software code

Central interface

Graphical interface

Monitoring the climate from a remote dashboard

Exploring the sensor test

Configuring the remote dashboard (Dweet.io)

Summary

8. Monitoring and Controlling Your Devices from a Smart Phone

Controlling a relay from a smart phone using APP Inventor

Hardware requirements

Software requirements

Creating our first application

Designing the interface

Communicating APP Inventor with Arduino ethernet shield

Code for APP Inventor

Reading JSON response in Android Studio using ethernet shield

Android application

Java class

Permission of the application

Controlling a DC motor using an Android Application

Hardware requirements

Controlling outputs from android using your Raspberry Pi Zero

Controlling outputs with Raspberry Pi via Bluetooth

Controlling lights from an Android Application

Summary

9. Putting It All Together

Integrating the system - development projects

Getting into the details of light sensor

Motion sensor

Automatic light controller

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

The keypad

Connecting an LCD screen to display the code

Controlling the door lock with a keypad

Code to access using the keypad

Integrating the system control with relays and devices

Controlling multiple appliances

The complete system

How to set up the power supplies

Power supply for AC loads

Connecting a relay of 24 DC volts to the Arduino board

Summary

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部