O'Reilly logo

JavaScript on Things: Hacking hardware for web developers by Lyza Danger Gardner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required