Smart Optical Sensors for Mechatronics and Robotics Systems