Node.js for Embedded Systems: Using Web Technologies to Build Connected Devices

How can we build bridges from the digital world of the Internet to the analog world that surrounds us? By bringing accessibility to embedded components such as sensors and microcontrollers, JavaScript and Node.js might shape the world of physical computing as they did for web browsers. This practical guide shows hardware and software engineers, makers, and web developers how to talk in JavaScript with a variety of hardware platforms. Authors Patrick Mulder and Kelsey Breseman also delve into the basics of microcontrollers, single-board computers, and other hardware components.

  • Use JavaScript to program microcontrollers with Arduino and Espruino
  • Prototype IoT devices with the Tessel 2 development platform
  • Learn about electronic input and output components, including sensors
  • Connect microcontrollers to the Internet with the Particle Photon toolchain
  • Run Node.js on single-board computers such as Raspberry Pi and Intel Edison
  • Talk to embedded devices with Node.js libraries such as Johnny-Five, and remotely control the devices with Bluetooth
  • Use MQTT as a message broker to connect devices across networks
  • Explore ways to use robots as building blocks for shared experiences
1124753096
Node.js for Embedded Systems: Using Web Technologies to Build Connected Devices

How can we build bridges from the digital world of the Internet to the analog world that surrounds us? By bringing accessibility to embedded components such as sensors and microcontrollers, JavaScript and Node.js might shape the world of physical computing as they did for web browsers. This practical guide shows hardware and software engineers, makers, and web developers how to talk in JavaScript with a variety of hardware platforms. Authors Patrick Mulder and Kelsey Breseman also delve into the basics of microcontrollers, single-board computers, and other hardware components.

  • Use JavaScript to program microcontrollers with Arduino and Espruino
  • Prototype IoT devices with the Tessel 2 development platform
  • Learn about electronic input and output components, including sensors
  • Connect microcontrollers to the Internet with the Particle Photon toolchain
  • Run Node.js on single-board computers such as Raspberry Pi and Intel Edison
  • Talk to embedded devices with Node.js libraries such as Johnny-Five, and remotely control the devices with Bluetooth
  • Use MQTT as a message broker to connect devices across networks
  • Explore ways to use robots as building blocks for shared experiences
14.99 In Stock
Node.js for Embedded Systems: Using Web Technologies to Build Connected Devices

Node.js for Embedded Systems: Using Web Technologies to Build Connected Devices

Node.js for Embedded Systems: Using Web Technologies to Build Connected Devices

Node.js for Embedded Systems: Using Web Technologies to Build Connected Devices

eBook

$14.99  $25.99 Save 42% Current price is $14.99, Original price is $25.99. You Save 42%.

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers


Overview

How can we build bridges from the digital world of the Internet to the analog world that surrounds us? By bringing accessibility to embedded components such as sensors and microcontrollers, JavaScript and Node.js might shape the world of physical computing as they did for web browsers. This practical guide shows hardware and software engineers, makers, and web developers how to talk in JavaScript with a variety of hardware platforms. Authors Patrick Mulder and Kelsey Breseman also delve into the basics of microcontrollers, single-board computers, and other hardware components.

  • Use JavaScript to program microcontrollers with Arduino and Espruino
  • Prototype IoT devices with the Tessel 2 development platform
  • Learn about electronic input and output components, including sensors
  • Connect microcontrollers to the Internet with the Particle Photon toolchain
  • Run Node.js on single-board computers such as Raspberry Pi and Intel Edison
  • Talk to embedded devices with Node.js libraries such as Johnny-Five, and remotely control the devices with Bluetooth
  • Use MQTT as a message broker to connect devices across networks
  • Explore ways to use robots as building blocks for shared experiences

Product Details

ISBN-13: 9781491928943
Publisher: O'Reilly Media, Incorporated
Publication date: 10/10/2016
Sold by: Barnes & Noble
Format: eBook
Pages: 266
File size: 18 MB
Note: This product may take a few minutes to download.

About the Author

Patrick Mulder works as HW/SW engineer focusing on embedded systems, web interfaces and measurement systems. In addition to Node.js for Embedded Systems Patrick has published the book Full Stack Web Development with Backbone.js. Patrick runs the Arduino meetup in Munich (http://meetup.com/Munchen-Arduino-Meetup) and shares thoughts online at his blog: http://thinkingonthinking.com. He likes to travel, to prototype ideas, and to solder.


Kelsey Breseman is an engineer and Steering Committee member of the Tessel Project —an open source organization whose aim is to empower web developers to enter the connected-devices space. Previously, Kelsey has been involved in developing consumer drones, research on sleep and temperature, implantable vision devices, and devices for lung cancer diagnosis. She has a degree in neural engineering, and is interested in prosthetics, speculative fiction, circus arts, and really long walks.

Table of Contents

Foreword ix

Preface xi

1 Connecting Worlds 1

Why the Internet of Things? 1

Embedded Devices 3

Embedded Internet 4

Protocols 5

Examples and Use Cases 7

JavaScript for Distributed Programming 9

JavaScript and the IoT 9

Hello World with JavaScript 10

JavaScript Runtime Environments 13

The Browser 13

The Server 14

Embedded Devices 16

The Node.js API 18

Buffer 18

Streams 19

2 Blink with Arduino 21

Getting Started with Microcontrollers 22

Arduino 23

The Blink Sketch 25

The Firmata Bridge 28

Programming an Arduino with JavaScript 30

Functional Blocks of an MCU 31

Pins 32

Microcontroller Versus Microprocessor 33

Block Diagrams 34

Analog Inputs 36

Pulse-Width Modulation 39

Pinouts 41

Firmware 42

3 Espruino 45

The Espruino Hardware 45

Programming Espruino 48

Variable Blink 52

Modules 53

Flashing Espruino Firmware 53

4 The Tessel 2 55

Hardware 55

Toolchain 57

Command-Line Interface 57

Pin Abstractions 59

Digital Pins 59

Analog Pins 59

Embedded Internet with System-on-Chip 60

5 Particle Photon 63

The Particle Photon 63

Particle Command-Line Interface 65

OTA Code Deploys 66

6 Single-Board Computers 71

The Raspberry Pi 71

BeagleBone 73

The Intel Edison 74

Boards with 64-Bit Instruction Sets 77

Using Embedded Linux 78

Working with SD Cards 78

Embedded Linux Distributions 79

OpenWRT 80

Debian 81

Yocto 81

Network Configuration 81

Debugging Network Settings 84

Running Node.js 84

Deploy Projects with Git 84

7 Components for Prototyping 87

Wiring Circuits 87

Breadboards 88

Grove Kit 89

Soldering 90

Printed Circuit Boards 91

Tessel Modules 94

Basic Components 94

Datasheets 95

Passive Components 95

LEDs 96

Sensors 97

Temperature 98

Motion 99

Ultrasonic Distance 100

Actuators 101

Servo Motors 101

Stepper Motors 102

DC Motors 102

Multimedia 102

Cables 103

Jumper Wires 103

USB Cables 103

FTDI-USB-Cable 103

Network Cables 103

8 Node.js Libraries for Hardware 105

JavaScript for the Hardware Abstraction Layer 106

The node-serialport Library 108

Serial Communication with JavaScript 108

Scanning for Devices 110

Receiving Data from Arduino 111

Sending Data to Arduino 113

The Johnny-Five Library 114

An Empty Project 114

The Board Object 114

The Johnny-Five REPL 115

Buttons 116

Analog Inputs 117

Proximity 117

Nodebot 118

The 12C Library 118

The LibMRAA Library 119

MRAA Setup 119

Outputs 120

Reading Inputs 120

Interrupts 121

Communications 122

The Cylon.js Library 122

9 Exploring Network Protocols 125

The Hypertext Transfer Protocol 126

Requesting the Weather 126

Prepare the HTTP Client 130

Building a Weather Station 131

Adding a Database 134

The Transmission Control Protocol and User Datagram Protocol 139

The WebSocket Protocol 142

The ws Module 142

Remote Procedure Calls over Websockets 145

10 Web Frontends for Things 149

Adding Static Pages 150

Basic jQuery 152

Adding the Model-View-Controller 154

Websockets in a Browser 157

A Bare Minimum Websocket Connection 158

The D3.js Library for Plotting Data 160

P5.js 162

11 Entering the Cloud 165

Publish-Subscribe Pattern 165

The MQTT Protocol 169

Connecting to an MQTT Broker 170

Publish Messages 171

Subscribe to Updates 172

MQTT Server with Mosca 173

Cloud Services 174

CloudMQTT 174

HiveMQ 175

PubNub 175

Telegram 176

Temboo 178

System Design with NodeRED 178

Install NodeRED 179

Concepts 179

12 Making Robots with Node.js 183

What Is a Robot? 183

Why Build Robots in Node.js? 184

Community 185

Education 185

Product Development 186

The Tessel Project 186

Robot Kits 188

Motors and Potentiometers 189

Sumobot Jr. 189

Hackarobot 190

Example Project: The Robot Claw 191

Example Project: Move a Vehicle 195

Servo 195

MD25 Motor Shield 196

13 Wireless Data with Bluetooth 197

The Bluetooth Low Energy Protocol 197

Communication Modes 199

Connect with Centrals 200

Beacons 202

RedBear Shields and Boards 203

BlueIOT 204

Libraries for Bluetooth 205

Arduino 205

BLE Scanner and Parser 206

Noble.js 207

Bleno.js 208

Example Project: Proximity Detection 209

14 Toward the Physical Internet 211

What Are Shared Experiences? 211

Connected Products 214

Responsive Environments 214

Impacts of the Physical Internet 216

15 From Products to Toolkits 219

JavaScript as a Toolkit 219

The Power of Modularity 220

Modularity in Hardware 220

Node.js: Driving Innovation in the IoT 221

Building Good Technology 222

A Node.js 223

B Early Hardware for IoT Systems 229

Index 233

From the B&N Reads Blog

Customer Reviews