# Two pidog issues

**URL:** <https://forum.sunfounder.com/t/two-pidog-issues/2374>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [January 11, 2025, 8:54pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374 "2025-01-11T20:54:15Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![quarkino](https://avatars.discourse-cdn.com/v4/letter/q/a698b9/32.png) [@quarkino](https://forum.sunfounder.com/u/quarkino)\
**Post date:** [January 11, 2025, 8:54pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/1 "2025-01-11T20:54:15Z")

</div>

Just assembled a pidog for the first time. Two issues so far:

1. Invariably, while running the example scripts (which they all work btw), its head starts shaking rapidly - almost like the servo is quickly connecting/disconnecting. I can stop the shaking it by just touching the head. But then it starts again after another command.

2. I get this error while running various commands: ALSA lib pcm.c:8570:(snd\_pcm\_recover) underrun occurred

Any ideas?

---

<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:** [January 13, 2025, 11:19am UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/2 "2025-01-13T11:19:38Z")

</div>

1. head servo shaking?  
Suggest to change the position of the tail servo with the head jittery servo and see if the head jitter problem is solved?
2. I get this error when running various commands: ALSA lib pcm.c:8570:(snd\_pcm\_recover)  
Did you run the sound example and did the speakers work properly.  
We suggest you reinstall i2samp.sh:  
cd ~/pidog  
sudo bash . /i2samp.sh  
Go ahead and run the example again, using the sudo run command.

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 14, 2025, 7:26pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/3 "2025-01-14T19:26:13Z")

</div>

Using the ‘run command’… I am not sure I understand how to do this… Thanks.

---

<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:** [January 15, 2025, 9:55am UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/4 "2025-01-15T09:55:13Z")

</div>

It is the Python code script that you run, you need to add “sudo” in front to run.  
For example, 1\_wake\_up.py will run as follows:  
sudo python3 1\_wake\_up.py

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 15, 2025, 7:17pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/5 "2025-01-15T19:17:06Z")

</div>

I knew that part but what confuses me is that in the documentation, in section 3 - Fun Python Projects - 2 Function demonstation, there is a banner that says ‘Need to run with sudo’ . I can run the program fine but, since I have not yet figured out how to get the sounds to work (that is for later), I was wondering…

---

<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:** [January 16, 2025, 10:10am UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/6 "2025-01-16T10:10:09Z")

</div>

Can you please run the alsamixer command, go to settings and adjust the volume of the speakers to maximum, and then go run the sound example to see how it works.  
What version of the 64-bit Raspberry Pi system are you currently using? Please let us know. (We are using the bookworm version 64-bit system)  
Please run the uname -a command and provide us with a screenshot of the information so that we can reproduce your problem.  
Please remove robot-hat, and check if the speaker on the back is good. --please provide pictures for us to see.  
We are very sorry that we have not reproduced the problem you are experiencing.  
We suggest you to install all the library code successfully (i2samp.sh), reboot your system, and then go to run the sound example to see if the speakers can sound properly yet. E.g. run the 9\_howling.py example and see what works.

 ![image (6)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/d/d1dfc3549dec81fe1bd9af14ec14b6c5949e68c0.png)  
 ![image (7)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/1/140322b6b652fe6c1f9130b5ffce32ebb82aa66c.png)  
 ![image (8)](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/b/bae874f48e173e284518a3c580b5eaad06568dad.png)

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 16, 2025, 4:24pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/7 "2025-01-16T16:24:41Z")

</div>

I will go through the steps you are suggesting. But, before doing so, I would like to confirm that I am using the Legacy 32 bits version of the OS as instructed in the documentation. That could be the cause? If so, is there a way to upgrade the OS without erasing everything?

Thanks

---

<div class="post-metadata">

**Author:** ![jonhurdibm](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.sunfounder.com/jonhurdibm/32/1053_2.png) [@jonhurdibm](https://forum.sunfounder.com/u/jonhurdibm)\
**Post date:** [January 16, 2025, 6:55pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/8 "2025-01-16T18:55:12Z")

</div>

Danmarion, I have successfully used both the legacy 32 Bit Raspberry Pi and the 64 Bit OS to produce sound output from the speaker. I have most recently discovered that the speaker on my system quit working. I cut the wires from the PiHat going to the speaker and patched in an external speaker and found everthing working as designed. So amazing what this thing can do using the ChatGPT APIs! I sent an email to the Sunfounder support folks and they are in the process of sending me a new speaker so I will be able to make PiDog portable again. Right now it is teathered to a large external speaker. I wish the best of luck to you.

---

<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:** [January 17, 2025, 6:39am UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/9 "2025-01-17T06:39:42Z")

</div>

It does not directly update to a new version of an older 32-bit operating system.  
Instead, a new installation is required. If you can’t get your speakers to work properly even on a new system.  
We will arrange for a replacement speaker to be shipped to you.  
You can also cut the wire from the PiHat to the speakers as jonhurdibm did and hook up an external speaker to see if it works. This will verify if the problem is with the hat or if the speaker is damaged.

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 17, 2025, 12:00pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/10 "2025-01-17T12:00:57Z")

</div>

I will use a spare SD card and reinstall, then proceed from there as you suggested.  
Thank you.

Envoyé de mon iPad

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 18, 2025, 9:18pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/11 "2025-01-18T21:18:51Z")

</div>

Thanks. I will follow that route.

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 18, 2025, 9:38pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/12 "2025-01-18T21:38:23Z")

</div>

I have created a new disk under the 64 bit version of the OS. That was fun…

After trying a number of things, I cannot get the speaker to work I suspect a faulty speaker. Can you send a new one? The rest seems to work fine.

Thanks

Daniel Marion

54 rue du Grand Coteau

Sainte-Julie, QC, J3E 2X2

Canada

---

<div class="post-metadata">

**Author:** ![Weirdyguy](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@Weirdyguy](https://forum.sunfounder.com/u/Weirdyguy)\
**Post date:** [January 18, 2025, 11:49pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/13 "2025-01-18T23:49:47Z")

</div>

Normalement il faut les contacter par courriel au [service@sunfounder.com](mailto:service@sunfounder.com) 😉

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 19, 2025, 12:03pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/14 "2025-01-19T12:03:11Z")

</div>

Noted.  
Thanks

Envoyé de mon iPhone

---

<div class="post-metadata">

**Author:** ![Danmarion](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@Danmarion](https://forum.sunfounder.com/u/Danmarion)\
**Post date:** [January 20, 2025, 12:22am UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/15 "2025-01-20T00:22:23Z")

</div>

Oups! Je n’avais pas vu que vous m’aviez répondu en français… 🙂

Envoyé de mon iPad

---

<div class="post-metadata">

**Author:** ![Weirdyguy](https://avatars.discourse-cdn.com/v4/letter/w/d78d45/32.png) [@Weirdyguy](https://forum.sunfounder.com/u/Weirdyguy)\
**Post date:** [January 20, 2025, 12:57am UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/16 "2025-01-20T00:57:36Z")

</div>

No problemo senior! 🤣

---

<div class="post-metadata">

**Author:** ![DarrenL](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@DarrenL](https://forum.sunfounder.com/u/DarrenL)\
**Post date:** [May 31, 2025, 11:10pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/17 "2025-05-31T23:10:19Z")

</div>

I use the code below to stop the head from shaking. Then, add stable(my\_dog) to stabilize the head. You could do something similar for the legs. Please tell me if this helps or not. IMPORTANT! REPLACE THE DASHES(MINUS SIGNS) WITH 4 SPACES OR ONE TAB. This is because the posts won’t let me indent the code.

def stable(my\_dog):  
----my\_dog.head\_move([[5, 5, 5], [0, 0, 0]], speed = 10)  
----my\_dog.wait\_all\_done()

---

<div class="post-metadata">

**Author:** ![DarrenL](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@DarrenL](https://forum.sunfounder.com/u/DarrenL)\
**Post date:** [May 31, 2025, 11:11pm UTC](https://forum.sunfounder.com/t/two-pidog-issues/2374/18 "2025-05-31T23:11:02Z")

</div>

Example(This is an edited 9\_howling.py code found in the pidog/examples folder):

 ![Screenshot 2025-05-31 180800](https://canada1.discourse-cdn.com/flex029/uploads/sunfounder/original/2X/7/7fadbf136a5d8028b062268a2c6ab469c9a52956.png)
