what is the working principle of sensor?
A sensor is a device that responds to some type of the input from the environment such as heat, light, motion, temperature, pressure and moisture. Sensors are used to switch currents and voltages. Every sensor has three terminals: Vcc, GND and output.