Inside AI
← Build & Hack
Proposed build / Edge AI

Gate a camera event with one distance reading

Verify the two sensors independently, then combine a model score with a recent distance. The integrated example is proposed and untested.

Device profile · Arduino Nicla Vision (ABX00051) ↗
Start with the documented setup

This is a proposed workflow. Follow the linked official setup, then use the checks below to decide whether it works on your hardware.

See a frame, then a distance

Attach ABX00051 to your computer with a micro-USB data cable. Back up the board, install the board-specific OpenMV 5.0.1 firmware, and run the camera example. Move a marked card in view and watch the IDE image update. Run the range example separately, then move the card between two measured marks. If the console is silent, inspect USB enumeration and the selected board. If the camera works but the distance does not change, check I²C bus 2, sensor orientation and the target. Arduino setup · Versioned examples

Bring up a model separately

The Nicla 5.0.1 ROM manifest lists person_detect.tflite. The tagged OpenMV example loads /rom/person_detect.tflite, calls model.predict([img]), and associates the returned scores with labels. That example names RT1062 in its header. Use its API pattern with the Nicla board settings, inspect the actual model labels, and check inference on the available memory before connecting the distance rule. Example source · Nicla ROM manifest

Combine two readings

Proposed integration: timestamp the frame and range reading; accept a target label only above your chosen score threshold and within a distance band established with a ruler. Suppress stale and invalid ranges. Print one event when the target enters the accepted state, and re-arm when it leaves. Start with a consenting subject for the bundled person model or supply a package-specific classifier. Check near, far and empty scenes; keep the two raw decisions in the evaluation log.

Primary sources

Arduino Nicla Vision user manual OpenMV 5.0.1 board guide for Arduino Nicla Vision OpenMV 5.0.1 Nicla Vision model manifest OpenMV 5.0.1 image classification example OpenMV 5.0.1 Nicla Vision build configuration OpenMV firmware release v5.0.1