7

Keyence has a useful comparison table (appologies the table doesn't look good on mobile): ╔════════════════════╦══════════════════╦══════════════════╗ ║ Item ║ Optical ║ Ultrasonic ║ ╠════════════════════╬══════════════════╬══════════════════╣ ║ Detectable target ║ Affected by ║ Unaffected by ║ ║ ║ ...


3

TL;DR: it depends entirely on the situation in which you intend to use the sensors. According to this article, it is entirely dependent on your application. You’ve mentioned you want to use it for obstacle avoidance, but the environment in which you want to do this is important. IR sensors are easily affected by external conditions such as ambient light ...


Only top voted, non community-wiki answers of a minimum length are eligible