# PiDog v2 Face track issues

**URL:** <https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993>\
**Category:** General\
**Created:** [November 6, 2025, 11:46pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993 "2025-11-06T23:46:04Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 6, 2025, 11:46pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/1 "2025-11-06T23:46:04Z")

</div>

Hello all, So new to ras pi Sudo and all the above. Having an issue with face track ( cd examples) all the dog does is rock his head to one side to the other. and stops. can any one help me out with this issue ? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [November 7, 2025, 6:08am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/2 "2025-11-07T06:08:25Z")

</div>

Please contact our after-sales team at [service@sunfounder.com](mailto:service@sunfounder.com).

To help us analyze and resolve the issue efficiently, could you please provide a video showing the problem?

Also, please check if the servo assembly is securely mounted and all screws are properly tightened.

---

<div class="post-metadata">

**Author:** ![Maheem](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@Maheem](https://forum.sunfounder.com/u/Maheem)\
**Post date:** [November 10, 2025, 2:51am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/3 "2025-11-10T02:51:14Z")

</div>

Hello, I think I have a solution for this problem. It’s something to do with the camera also recognizing qr codes. You need to change the following code in /usr/local/lib/python3.11/dist-packages/vilib/vilib.py Between the line 333 and 335 comment out all references to qrcode\_prop.

---

<div class="post-metadata">

**Author:** ![Maheem](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@Maheem](https://forum.sunfounder.com/u/Maheem)\
**Post date:** [November 10, 2025, 3:19am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/4 "2025-11-10T03:19:48Z")

</div>

The current vilib code has a bug. It expects both the qr code and the face detection to be running at the same time. To fix this you need change line 335 of vilib.py from a “or” to an “and”. And if you want to run both the qrcode and the facedetect at the same time then inside your 7\_face\_track.py you need to add Vilib.qrcode\_detect\_switch(True) at line 15.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 10, 2025, 6:33am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/5 "2025-11-10T06:33:18Z")

</div>

ill try it thanks, but your speaking french to me lol. sudo and python are so new to me.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 12, 2025, 12:12am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/6 "2025-11-12T00:12:20Z")

</div>

so i did what you asked no luck, thanks. ill show a video. trying to get an audio clip of the sound byte as well. but since i installed the controller app i got no sound ..

cd ~/pidog/examples  
sudo python3 1\_wake\_up.py  
Traceback (most recent call last):  
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 411, in pin  
pin = self.pins[info]  
~~~~~~~~~ ^^^^^^  
KeyError: PinInfo(number=29, name=‘GPIO5’, names=frozenset({‘5’, ‘WPI21’, ‘GPIO5’, 5, ‘J8:29’, ‘BCM5’, ‘BOARD29’}), pull=‘’, row=15, col=1, interfaces=frozenset({‘gpio’, ‘’, ‘dpi’, ‘spi’, ‘i2c’, ‘uart’}))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “/home/chapo/pidog/examples/1\_wake\_up.py”, line 7, in  
my\_dog = Pidog(head\_init\_angles=[0, 0, -30])  
File “/usr/local/lib/python3.13/dist-packages/pidog-1.3.9-py3.13.egg/pidog/pidog.py”, line 131, in **init**  
utils.reset\_mcu()  
~~~~~~~~~~~~~~~ ^^  
File “/usr/local/lib/python3.13/dist-packages/robot\_hat/utils.py”, line 155, in reset\_mcu  
pin = Pin(“MCURST”)  
File “/usr/local/lib/python3.13/dist-packages/robot\_hat/pin.py”, line 96, in **init**  
self.setup(mode, pull, active\_state)  
~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/local/lib/python3.13/dist-packages/robot\_hat/pin.py”, line 134, in setup  
self.gpio = OutputDevice(self.\_pin\_num)  
~~~~~~~~~~~~ ^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 108, in **call**  
self = super(). **call** (\*args, \*\*kwargs)  
File “/usr/lib/python3/dist-packages/gpiozero/output\_devices.py”, line 74, in **init**  
super(). **init** (pin, pin\_factory=pin\_factory)  
~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/mixins.py”, line 75, in **init**  
super(). **init** (\*args, \*\*kwargs)  
~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/gpiozero/devices.py”, line 553, in **init**  
pin = self.pin\_factory.pin(pin)  
File “/usr/lib/python3/dist-packages/gpiozero/pins/pi.py”, line 413, in pin  
pin = self.pin\_class(self, info)  
File “/usr/lib/python3/dist-packages/gpiozero/pins/lgpio.py”, line 126, in **init**  
lgpio.gpio\_claim\_input(  
~~~~~~~~~~~~~~~~~~~~~~ ^  
self.factory.\_handle, self.\_number, lgpio.SET\_PULL\_NONE)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/usr/lib/python3/dist-packages/lgpio.py”, line 755, in gpio\_claim\_input  
return \_u2i(\_lgpio.\_gpio\_claim\_input(handle&0xffff, lFlags, gpio))  
File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in \_u2i  
raise error(error\_text(v))  
lgpio.error: ‘GPIO busy’

ha I figured this lil guy would keep my mind busy. I wasnt lying lol

so im going to reinstall the original program start fresh i guess LOL cant figure out how to turn off the app

Damn you chat gpt lololol

---

<div class="post-metadata">

**Author:** ![Maheem](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@Maheem](https://forum.sunfounder.com/u/Maheem)\
**Post date:** [November 12, 2025, 12:51am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/7 "2025-11-12T00:51:17Z")

</div>

Maybe you didn’t connect the wires correctly? Or maybe you didn’t install some other components? Also, I can’t seem to find your video. Did you forget to attach it? If the problem continues you should contact the moderator or email me the video, I’ll see what I can do. ([maximsun28alt@gmail.com](mailto:maximsun28alt@gmail.com))

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [November 12, 2025, 3:49am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/8 "2025-11-12T03:49:39Z")

</div>

Thank you for providing the error log.

The core issue, as seen in the log, is a “GPIO busy” error. This occurred when the system tried to access the MCURST pin (likely GPIO5 / BOARD29) during PiDog’s initialization, but the pin was already occupied by another process.

Here is our recommended troubleshooting procedure:

Step 1: Initial Troubleshooting

Reboot your system. This will clear any temporary processes that might be using the GPIO pin.

After rebooting, run your target script immediately, before starting any other programs that might use the GPIO.

Step 2: Reinstall the System & Libraries (if the issue persists)  
If the problem continues, we recommend a fresh start. Please reinstall the operating system and then carefully follow the official tutorial to install all libraries in the specified order.

The installation commands are as follows:

[https://docs.sunfounder.com/projects/pidog/en/latest/python/python\_start/install\_all\_modules.html](https://docs.sunfounder.com/projects/pidog/en/latest/python/python_start/install_all_modules.html)

Install robot-hat module：

cd ~/

git clone -b 2.5.x [https://github.com/sunfounder/robot-hat.git](https://github.com/sunfounder/robot-hat.git) --depth 1

cd robot-hat

sudo python3 [install.py](http://install.py)

Install vilib module：

cd ~/

git clone [https://github.com/sunfounder/vilib.git](https://github.com/sunfounder/vilib.git)

cd vilib

sudo python3 [install.py](http://install.py)

Install pidog module：

cd ~/

git clone [https://github.com/sunfounder/pidog.git](https://github.com/sunfounder/pidog.git) --depth 1

cd pidog

sudo pip3 install . --break

cd ~/robot-hat

sudo bash [i2samp.sh](http://i2samp.sh)

Please note: We have recently updated the code for these libraries. Following the steps above ensures you have the latest versions, which is crucial for compatibility and stability.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 12, 2025, 5:41pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/9 "2025-11-12T17:41:40Z")

</div>

yeah I followed the web pages instructions 3 times and facetrack still has an issue, trying to show a video but the vid is way to big. can the OS im using be the culprit. the code and errors were of me and chat gpt trying to get facetrack to work those were the results.. reinstalled the drivers, etc last night same issue.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 12, 2025, 11:02pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/10 "2025-11-12T23:02:02Z")

</div>



---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [November 13, 2025, 8:02am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/11 "2025-11-13T08:02:02Z")

</div>

Position the PiDog’s camera at the same level as your face, then run the 7\_face\_track.py example.

You need to access the camera video stream in your browser, for example:

[http://192.168.18.159:9000/mjpg](http://192.168.18.159:9000/mjpg)

Create a sound by clapping your hands or using other methods. The sound direction sensor will detect the sound source, and PiDog’s head will turn toward it. If the camera detects a face in that direction, it will greet you.

If a face is already within the camera’s view and move slowly，PiDog’s camera will track and follow the face’s movement.

Sorry we couldn’t identify any specific issue from the given video.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 13, 2025, 11:42am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/12 "2025-11-13T11:42:30Z")

</div>

2 videos one of face track, the other of him scratching.. looks reversed though am I wrong LOL

I will give it another over haul tonight.. Fresh OS .. STAY TUNED!

---

<div class="post-metadata">

**Author:** ![Pablo2010](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Pablo2010](https://forum.sunfounder.com/u/Pablo2010)\
**Post date:** [November 14, 2025, 1:07am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/13 "2025-11-14T01:07:44Z")

</div>

Hi, I’m not sure if this is the right place for my question, but I’m also having problems with facial recognition. When I start the script, Pidog moves its head searching for the sound, but the camera isn’t transmitting. I’m using Pidog v2 with a Raspberry Pi 4.  
Imgshow start …

Web display on:

[http://192.168.0.231:9000/mjpg](http://192.168.0.231:9000/mjpg)

Starting web streaming …

- Serving Flask app ‘vilib.vilib’

- Debug mode: off

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [November 14, 2025, 2:19am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/14 "2025-11-14T02:19:05Z")

</div>

Could you please confirm if your camera module is correctly connected?

Please double-check the connections against our wiring diagram.

Once you’ve verified the camera connections, run the example and visit [http://192.168.0.231:9000/mjpg](http://192.168.0.231:9000/mjpg) in your browser to see if the camera feed displays properly.

Please ensure all your library code is updated to the latest version. We recommend reinstalling all libraries before running the example again.

 ![1 (5)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/8/897412df89b1744bfb2e6781c4740ab88a3114fb.jpeg)

 ![4 (7)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/0/03798d29f157e8e835298fbab3ccc41508bdd9d7.jpeg)

 ![5 (5)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/d/dcc4eba3ff69115992fb3940d46ebf6d04a955f8.jpeg)

 ![3 (4)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/3/3603b8df1d0916e7fb5a64719a341fa4f2f720a3.jpeg)

 ![2 (5)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/f/f788312f054e49e580745c71ca8accabdbe703ed.jpeg)

---

<div class="post-metadata">

**Author:** ![Pablo2010](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Pablo2010](https://forum.sunfounder.com/u/Pablo2010)\
**Post date:** [November 14, 2025, 6:05pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/15 "2025-11-14T18:05:54Z")

</div>

Hi, the connections were correct; once the libraries were installed, it works perfectly. Thanks.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 14, 2025, 11:40pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/16 "2025-11-14T23:40:14Z")

</div>

so I did as you asked FRESH os all mods installed. camera is working fine but still no face track just moves head side to side!

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 16, 2025, 1:40pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/17 "2025-11-16T13:40:36Z")

</div>

does every ones speak sound like this? im wondering if the issue is with the pi5 after receiving a robot hat 5 which wasn’t properly soldered. hmmm when pidog uses face track does his head move left to right? not neck .. if any one can answer would be super helpful

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [November 17, 2025, 3:28am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/18 "2025-11-17T03:28:04Z")

</div>

Could you please send a short video or some pictures of the issue so we can know it better.  
If the video memory is large, please upload the recorded video to onedrive, share the video link with us, and give us access permissions.

The video you provided earlier does not clearly show the issue.

You also mentioned receiving a Robot HAT 5 that might have soldering issues?  
Please provide clear photos of the Robot HAT 5 for us to review.

We have verified the software code, and it is working correctly. Therefore, the problem you’re encountering is likely unrelated to the software.

Please ensure you have installed all library codes correctly. We used the latest Raspberry Pi OS Trixie (64-bit) for our installation and testing.

---

<div class="post-metadata">

**Author:** ![R.serr](https://avatars.discourse-cdn.com/v4/letter/r/7993a0/32.png) [@R.serr](https://forum.sunfounder.com/u/R.serr)\
**Post date:** [November 17, 2025, 7:57pm UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/19 "2025-11-17T19:57:05Z")

</div>

ive been emailing sunfounder as well i was under the impression you were getting the longer videos

---

<div class="post-metadata">

**Author:** ![SunFounder\_Moderator](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@SunFounder\_Moderator](https://forum.sunfounder.com/u/SunFounder_Moderator)\
**Post date:** [November 18, 2025, 10:15am UTC](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993/20 "2025-11-18T10:15:33Z")

</div>

You mentioned that the GPIO header pins on the Robot HAT might not be soldered properly?

Could you please provide a clear photo for us to check?

[Next page](https://forum.sunfounder.com/t/pidog-v2-face-track-issues/3993.md?page=2)
