Other types of digital sensors

Switches are perhaps the most used devices as digital input sensors but obviously not the only ones. Any device that can open or close a circuit branch can be easily configured and connected to Arduino to act like a digital input sensor, from a reed relay (http://en.wikipedia.org/wiki/Reed_relay) to a PIR motion detector (http://en.wikipedia.org/wiki/Passive_infrared_sensor).

One of those devices that are very cheap and easy to acquire are optocouplers or, as they are sometimes referred to, optical switches.

An optocoupler is a very simple device that has two parts:

  • An infrared light emitter: This is a simple infrared LED in a housing that directs its light emission in a precise direction
  • A phototransistor: This is a ...

Get Arduino Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.