- Inputs: Making Physical Interfaces
We looked at sensors which allow us to translate physical conditions of the world into electrical stimulus. Now we’ll look at how we can use “inputs” from button presses, sliders, and things like that.
Input devices work much like sensors and we use the same way of finding out what state they are in. They work in two major types: switches and push buttons which will always either be on or off i.e. we want to use digitalRead to know if power is flowing (HIGH) or if it isn’t. Some inputs like potentiometers and sliders work like FSRs or photocells. They are variable resistors that instead of environmental properties, use human action to change how much resistance they apply to our circuit. These inputs give us values in a range.
Inputs come in all shapes and sizes. Take a look at Sparkfun or Adafruit to see the variety of buttons, switches, sliders, push buttons and more you can use in your projects
In your IoT kit you have a bunch of input components included. These are:
These are nifty little switches that plug nicely into a breadboard or a proto-board. They are normally-open type and are rated at 12V, 50mA.
Know that push-buttons are momentary switches - when you push them they pop right back up - and they come in all shapes and sizes to suit your project!
This is a tiny Double Pole Double Throw (DPDT) Switch with 6 legs.
Like Pushbuttons you can find switches in all shapes and sizes. They all work the same - just bigger/smaller/just right.
This is a variable resistor whose value can be changed by simply turning the knob.