SunFounder PiDog User manual

SunFounder PiDog Kit
Release 1.0
sunfounder
Feb 02, 2024


CONTENTS
1 Assemble Videos 3
2 Play with Python 5
2.1 1. Quick Guide on Python ........................................ 5
2.2 2. Calibrate the PiDog .......................................... 34
2.3 3. Fun Python Projects .......................................... 37
2.4 4. Easy Coding .............................................. 64
3 Hardware 79
3.1 Robot HAT ................................................ 79
3.2 Camera Module ............................................. 81
3.3 Sound Direction Sensor ......................................... 83
3.4 6-DOF IMU ............................................... 84
3.5 Dual Touch Sensor ............................................ 85
3.6 11-channel Light Board ......................................... 86
3.7 Ultrasonic Module ............................................ 87
3.8 18650 Battery .............................................. 88
4 Appendix 91
4.1 Filezilla Software ............................................. 91
4.2 Get the IP address ............................................ 93
4.3 Install OpenSSH via Powershell ..................................... 93
4.4 PuTTY .................................................. 95
5 Copyright Notice 99
i

ii

SunFounder PiDog Kit, Release 1.0
Thank you for choosing our PiDog.
Note: This document is available in the following languages.
•
•
•
Please click on the respective links to access the document in your preferred language.
PiDog is a Raspberry Pi pet robot with aluminum alloy structure. It can act as a mechanical pet, show cuteness to you,
and interact with you.
It is equipped with a camera module, which can perform color recognition, face detection and other projects; 12 metal
gear servos support it to walk, stand, sit, shake its head, and pose in various poses; The ultrasonic module on the head
enables it to quickly detect obstacles ahead; Special touch sensors allow it to respond to your touch; The Light Board
on the chest can emit colorful light effects, and with the speaker equipped with the robot HAT, PiDog can express
emotions such as happiness and excitement. In addition, PiDog is also equipped with a sound direction sensor and a
6-DOF IMU module to realize more complex and interesting usage scenarios.
If you have any questions, please send an email to service@sunfounder.com and we will respond as soon as possible.
Content
CONTENTS 1

SunFounder PiDog Kit, Release 1.0
2 CONTENTS

CHAPTER
ONE
ASSEMBLE VIDEOS
Before assembling the PiDog, please first verify that all parts and components have been included. If there are any
missing or damaged components, please contact SunFounder immediately at service@sunfounder.com to resolve the
issue as soon as possible.
Please follow the steps on the following PDF for assembly instructions:
•Component List and Assembly Instructions.
Mount Raspberry Pi Zero W on PiDog
If your mainboard is a Raspberry Pi Zero W, here are the steps to install it on the PiDog.
Afterward, you can continue following the instructions in the video below from 2:28 onwards to assemble it.
Assembly Tutorial Video(Raspberry Pi 4/3/1 Model)
This video will walk you through the process of assembling your robot from scratch.
In this tutorial, you will learn:
•Preparation: We’ll introduce you to all the tools and parts needed, ensuring you’re fully equipped before starting
the assembly.
•Assembly Steps: We’ll demonstrate each assembly step in a systematic manner.
•Tips and Considerations: Throughout the process, we’ll share essential tips and tricks to help you avoid com-
mon mistakes and ensure your robot operates smoothly.
•Zeroing a Servo: Before fixing each servo, it needs to be zeroed first. The steps for zeroing are to first install
the Raspberry Pi OS, then install the required modules, and then run a script (set the angle of all PWM pins to
0). After that, plug in the servo wire to zero the servo.
The assembly process for Pidog is quite long, so we have divided it into two videos. The first video covers assembling
Pidog’s body and four legs.
The second video covers assembling the head and calibration.
3

SunFounder PiDog Kit, Release 1.0
4 Chapter 1. Assemble Videos

CHAPTER
TWO
PLAY WITH PYTHON
If you want to program in python, then you will need to learn some basic Python programming skills and basic knowl-
edge of Raspberry Pi, please configure the Raspberry Pi first according to 1. Quick Guide on Python.
2.1 1. Quick Guide on Python
This section is to teach you how to install Raspberry Pi OS, configure wifi to Raspberry Pi, remote access to Raspberry
Pi to run the corresponding code.
If you are familiar with Raspberry Pi and can open the command line successfully, then you can skip the first 3 parts
and then complete the last part.
2.1.1 1. What Do We Need?
Required Components
Raspberry Pi
The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard
keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how
to program in languages like Scratch and Python.
5

SunFounder PiDog Kit, Release 1.0
Power Adapter
To connect to a power socket, the Raspberry Pi has a micro USB port (the same found on many mobile phones). You
will need a power supply which provides at least 2.5 amps.
Micro SD Card
Your Raspberry Pi needs an Micro SD card to store all its files and the Raspberry Pi OS. You will need a micro SD
card with a capacity of at least 8 GB
Optional Components
Screen
To view the desktop environment of Raspberry Pi, you need to use the screen that can be a TV screen or a computer
monitor. If the screen has built-in speakers, the Pi plays sounds via them.
Mouse & Keyboard
When you use a screen , a USB keyboard and a USB mouse are also needed.
HDMI
The Raspberry Pi has a HDMI output port that is compatible with the HDMI ports of most modern TV and computer
monitors. If your screen has only DVI or VGA ports, you will need to use the appropriate conversion line.
Case
You can put the Raspberry Pi in a case; by this means, you can protect your device.
Sound or Earphone
The Raspberry Pi is equipped with an audio port about 3.5 mm that can be used when your screen has no built-in
speakers or when there is no screen operation.
6 Chapter 2. Play with Python

SunFounder PiDog Kit, Release 1.0
2.1.2 2. Installing the OS
Required Components
•Raspberry Pi 5B
•A Personal Computer
•A Micro SD card
Installation Steps
1. Visit the Raspberry Pi software download page at Raspberry Pi Imager. Choose the Imager version compatible
with your operating system. Download and open the file to initiate installation.
2. A security prompt may appear during installation, depending on your operating system. For example, Windows
might display a warning message. In such cases, select More info and then Run anyway. Follow the on-screen
guidance to complete the installation of the Raspberry Pi Imager.
3. Insert your SD card into your computer or laptop’s SD card slot.
4. Launch the Raspberry Pi Imager application by clicking its icon or typing rpi-imager in your terminal.
2.1. 1. Quick Guide on Python 7

SunFounder PiDog Kit, Release 1.0
5. Click CHOOSE DEVICE and select your specific Raspberry Pi model from the list (Note: Raspberry Pi 5 is
not applicable).
6. Select CHOOSE OS and then choose Raspberry Pi OS (Legacy).
8 Chapter 2. Play with Python

SunFounder PiDog Kit, Release 1.0
Warning:
•Please do not install the Bookworm version as the speaker will not work.
•You need to install the Raspberry Pi OS (Legacy) version - Debian Bullseye.
7. Click Choose Storage and select the appropriate storage device for the installation.
Note: Ensure you select the correct storage device. To avoid confusion, disconnect any additional
storage devices if multiple ones are connected.
2.1. 1. Quick Guide on Python 9

SunFounder PiDog Kit, Release 1.0
8. Click NEXT and then EDIT SETTINGS to tailor your OS settings. If you have a monitor for your Raspberry
Pi, you can skip the next steps and click ‘Yes’ to begin the installation. Adjust other settings later on the monitor.
9. Define a hostname for your Raspberry Pi.
10 Chapter 2. Play with Python

SunFounder PiDog Kit, Release 1.0
Note: The hostname is your Raspberry Pi’s network identifier. You can access your Pi using
<hostname>.local or <hostname>.lan.
10. Create a Username and Password for the Raspberry Pi’s administrator account.
Note: Establishing a unique username and password is vital for securing your Raspberry Pi, which
lacks a default password.
11. Configure the wireless LAN by providing your network’s SSID and Password.
Note: Set the Wireless LAN country to the two-letter ISO/IEC alpha2 code corresponding to
your location.
2.1. 1. Quick Guide on Python 11

SunFounder PiDog Kit, Release 1.0
12. Click SERVICES and activate SSH for secure, password-based remote access. Remember to save your settings.
12 Chapter 2. Play with Python

SunFounder PiDog Kit, Release 1.0
13. Confirm your selected settings by clicking Yes.
2.1. 1. Quick Guide on Python 13

SunFounder PiDog Kit, Release 1.0
14. If the SD card contains existing data, ensure you back it up to prevent data loss. Proceed by clicking Yes if no
backup is needed.
15. The OS installation process will commence on the SD card. A confirmation dialog will appear upon completion.
14 Chapter 2. Play with Python

SunFounder PiDog Kit, Release 1.0
16. Insert the SD card set up with Raspberry Pi OS into the microSD card slot located on the underside of the
Raspberry Pi.
2.1. 1. Quick Guide on Python 15

SunFounder PiDog Kit, Release 1.0
2.1.3 3. Power Supply for Raspberry Pi (Important)
Charge
Insert the battery cable. Next, insert the USB-C cable to charge the battery. You will need to provide your own charger;
we recommend a 5V 3A charger, or your commonly used smartphone charger will suffice.
Note: Connect an external Type-C power source to the Type-C port on the robot hat; it will immediately start charging
the battery, and a red indicator light will illuminate.When the battery is fully charged, the red light will automatically
turn off.
16 Chapter 2. Play with Python
Other manuals for PiDog
1
Table of contents
Other SunFounder Robotics manuals

SunFounder
SunFounder Rollarm User manual

SunFounder
SunFounder Bionic Robot Lizard User manual

SunFounder
SunFounder Sloth:bit User manual

SunFounder
SunFounder Rollarm User manual

SunFounder
SunFounder RollFlash User manual

SunFounder
SunFounder 3in1 Kit User manual

SunFounder
SunFounder Sloth Learning Kit User manual

SunFounder
SunFounder PiSloth User manual

SunFounder
SunFounder RollbotMicro User manual

SunFounder
SunFounder picar-x User manual