Warming up – Basic I/O with buttons, pots, and LEDs
Fundamentally, a sensor is any device that generates some sort of output when exposed to a phenomenon—say, temperature, humidity, light, vibration, and so on. In our case, this output is an electrical signal. However, it is usually not possible to read this electrical signal directly by connecting to an input pin of a microcontroller, so sensor designers integrate another circuitry, called a signal conditioner, to filter this electrical signal and convert it into a form ready to be processed as input to the microcontroller.
Actuators are on the output side of IoT solutions. They change their state according to an analog or digital signal coming from the microcontroller and generate output to the environment. Some examples are a buzzer to make sound, an LED to emit light, a relay to switch on/off, or a motor to create motion.
The most basic skill with any embedded development is to use general-purpose I/O (GPIO...