Skip to Main Content
JavaScript on Things
book

JavaScript on Things

by Lyza Gardner
March 2018
Beginner content levelBeginner
448 pages
15h 26m
English
Manning Publications
Content preview from JavaScript on Things

Chapter 4. Sensors and input

This chapter covers

  • The role sensors play in projects as transducers, converting physical phenomena to electrical signals
  • How microcontrollers use analog-to-digital conversion (ADC) to interpret incoming analog signals
  • Building voltage divider circuits to read resistive sensors like photoresistors
  • Using Johnny-Five’s generic Sensor class to read sensor data and listen for data and changes
  • Taking advantage of Johnny-Five’s component-specific Thermometer and Button classes
  • Managing default digital logic levels using pull-down resistors

To build nifty gadgets, whether they’re temperature-controlled automatic fans or more interesting inventions, you’ve got to be able to gather information and input from the real, ...

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

JavaScript Everywhere

JavaScript Everywhere

Adam D. Scott
JavaScript

JavaScript

T. J. Crowder

Publisher Resources

ISBN: 9781617293863Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link