A sensor is a device that detects a physical quantity — temperature, light, motion, pressure, gas — and converts it into an electrical signal a computer can read.1
Overview
Sensors are the input side of nearly every embedded device. Some output a raw analog voltage that a microcontroller digitizes with its ADC; many modern sensors include their own electronics and present a clean digital reading over I²C or SPI, or as a simple GPIO signal. Common examples include thermistors, accelerometers and gyroscopes, photodiodes, microphones, and pressure and gas sensors.
Technically a sensor is a transducer — it converts energy from one form (heat, light, motion) into an electrical signal. Whether that signal needs the extra analog-to-digital step or arrives ready-made as data is the main practical distinction between an analog sensor and a digital one.
Analog versus digital sensors
The output format shapes how the microcontroller reads it:
| Trait | Analog sensor | Digital sensor |
|---|---|---|
| Output | Continuous voltage | Numbers over a bus |
| MCU reads via | On-chip ADC | I²C / SPI / GPIO |
| Extra circuitry | Often needs conditioning | Built into the sensor |
| Example | Thermistor, photocell | BME280, MPU-6050 |
Where it fits
Sensors give an embedded system awareness of the physical world; paired with network connectivity they are the data source behind the Internet of Things. The microcontroller reads the sensor, decides what to do, and drives an output — closing the loop between sensing and action. A weather-station node reporting temperature and humidity over a radio link is a textbook sensor-plus-MCU device — and precisely the kind of small transmitter whose signals GopherTrunk decodes.