Inside AI
← Build & Hack
Proposed build / Edge AI

Make an offline pet visitor light

Proposed extension of the MicroPython pet-face example. Turn a sequence of detections into a single visible visit.

Device profile · DFRobot UNIHIKER K10 ↗
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.

Establish a baseline

Flash the documented K10 MicroPython firmware, connect Thonny and run the cat/dog example with Wi-Fi off. Keep the pet’s face in view and then clear the scene. Look for the live preview, fresh serial updates and changes in cat_flag. A frozen preview or stale serial result makes the trial inconclusive.

Count one visit

Read the flag only after is_ai_data_updated() reports a fresh result. Try turning a light on after two consecutive positives and rearming after three negatives. These are proposed starting values. Show a visit count on the LCD so a pet staying in place does not count as several arrivals.

Observe the misses

Repeat with a partly hidden face and with a printed pet image. Record true visits, missed visits and false lights. A positive flag signals a face-like detection and cannot identify a particular animal.

Primary sources

K10 hardware reference Flash the K10 MicroPython firmware K10 pet-face example in MicroPython