O'Reilly logo

Programming the Photon: Getting Started with the Internet of Things by Christopher Rush

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

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

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