Smart sensors for detection