Skip to Content
Practical Internet of Things with JavaScript
book

Practical Internet of Things with JavaScript

by Arvind Ravulavaru
December 2017
Intermediate to advanced
296 pages
5h 56m
English
Packt Publishing
Content preview from Practical Internet of Things with JavaScript

Deploying to Raspberry Pi

Now that we have seeded a Rekognition collection, as well as tested it (an optional step), we are now going to start setting up the Raspberry Pi code.

We will be using all the other code pieces from the chapter8 folder as is and only modifying the Raspberry Pi client in the chapter9 folder.

Copy the entire code from the chapter8 folder into the chapter9 folder. Then, open the pi-client folder either on your desktop or on the Raspberry Pi itself, and update it as follows:

var config = require('./config.js'); var mqtt = require('mqtt'); var GetMac = require('getmac'); var Raspistill = require('node-raspistill').Raspistill; var crypto = require("crypto"); var Gpio = require('onoff').Gpio; var exec = require('child_process').exec; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driving JavaScript Applications

Test-Driving JavaScript Applications

Venkat Subramaniam
Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck

Publisher Resources

ISBN: 9781788292948Supplemental Content