A sensor is a device that detects inputs from the environment such as light, heat, motion, pressure and converts it into a readable output. Common sensors include temperature sensors, proximity sensors, accelerometers, infrared sensors, pressure sensors, light sensors, ultrasonic sensors, gas sensors, touch sensors, color sensors, humidity sensors, tilt sensors, and flow/level sensors. Temperature sensors are one of the most common and measure changes in temperature through changes in properties like resistance or voltage. Proximity sensors detect nearby objects without contact using techniques like optics, ultrasound, or capacitance. Infrared sensors detect objects using infrared light and are used for applications like proximity detection in phones.