5

Inputs

In this chapter we will program some input devices such as switches, temperature sensors, and many more. Input devices are generally used to trigger some output or event. A simple switch can easily be used to turn something on or off, such as a light-emitting diode (LED). A sensor used as an input device can be used to monitor something like temperature or a certain type of gas, and when triggered, it can set a series of events in motion or just be collected as data and interpreted into something visual. This chapter will also look at some of the basic programming used in reading and detecting inputs, which you can use for your own projects in the future. We will look at both digital and analog inputs, where a digital system will return ...

Get Programming the Photon: Getting Started with the Internet of Things now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.