A sensor is a device that produces an output signal to detect a physical phenomenon.
In its broadest definition, a sensor is a device, module, machine or subsystem that detects events or changes in its environment and sends the information to other electronics, often a computer processor. The sensor is always used in conjunction with other electronics.
sensors are used in everyday objects such as touch-sensitive elevator buttons (touch sensor) and lamps that dim or glow when the base is touched, which most people will never know about. With the development of micromachines and easy-to-use microcontroller platforms, sensor applications have expanded beyond traditional measurements of temperature, pressure, and flow.