๐ Previous article: ๐ ๏ธ Building the FreeNove Robot Dog
https://qiita.com/tri-edge/items/61102e5ae0df0b685eff
๐ฏ Goal
After assembling the robot dog, this step verifies that all hardware modules are working correctly.
Completing these tests helps prevent issues when running full control programs later.
๐งฐ Preparation
- Insert the battery
- Turn ON switches S1 and S2
- Place the robot on a flat surface (use calibration supports or small supports or blocks to slightly lift the body off the ground)
- Connect to Raspberry Pi using VNC Viewer (GUI required)
๐ Check I2C Devices
โถ Run
i2cdetect -y 1
Expected addresses:
0x40 โ Servo driver (PCA9685)
0x48 โ ADC
0x68 โ MPU6050 sensor [docs.freenove.com

๐ If any address is missing, check wiring connections.
๐ค Servo Test
โถ Run
cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
sudo python test.py Servo
โ Result
The robot moves through several poses (A โ B โ C โ D)

Smooth movement means the servos are working correctly
โ ๏ธ Troubleshooting
Incorrect movement โ check servo wiring and channel connections
Code
from Servo import *
servo=Servo()
def test_Servo():
try:
for i in range(90):
servo.setServoAngle(4,90-i)
servo.setServoAngle(7,90-i)
servo.setServoAngle(8,90+i)
servo.setServoAngle(11,90+i)
time.sleep(0.01)
for i in range(90):
servo.setServoAngle(2,90-i)
servo.setServoAngle(5,90-i)
servo.setServoAngle(10,90+i)
servo.setServoAngle(13,90+i)
time.sleep(0.01)
for i in range(60):
servo.setServoAngle(3,90-i)
servo.setServoAngle(6,90-i)
servo.setServoAngle(9,90+i)
servo.setServoAngle(12,90+i)
time.sleep(0.01)
print ("\nEnd of program")
except KeyboardInterrupt:
print ("\nEnd of program")
๐ ADC (Battery Voltage) Test
โถ Run
$ sudo python test.py ADC
โ Result
Battery voltage is printed every second
Code
from ADS7830 import *
adc=ADS7830()
def test_Adc():
try:
while True:
Power=adc.readAdc(0)/255.0*5.0*2
print ("The battery voltage is "+str(Power)+"V")
time.sleep(1)
print ('\n')
except KeyboardInterrupt:
print ("\nEnd of program")
๐ Ultrasonic Sensor Test
โถ Run
sudo python test.py Ultrasonic
โ Result
Distance (cm) is displayed continuously
Code
from Ultrasonic import *
ultrasonic=Ultrasonic()
def test_Ultrasonic():
try:
while True:
data=ultrasonic.get_distance() #Get the value
print ("Obstacle distance is "+str(data)+"CM")
time.sleep(1)
except KeyboardInterrupt:
print ("\nEnd of program")
๐ LED Test
The RGB LED module is positioned at the top.

โถ Run
sudo python test.py Led
Input PCB version (V1.0). It looks like the below.
โ Result
LED cycles: Red โ Green โ Blue โ White โ Off
Code
def test_Led():
try:
#Red wipe
print ("\nRed wipe")
led.colorWipe([255, 0, 0])
time.sleep(1)
#Green wipe
print ("\nGreen wipe")
led.colorWipe([0, 255, 0])
time.sleep(1)
#Blue wipe
print ("\nBlue wipe")
led.colorWipe([0, 0, 255])
time.sleep(1)
#White wipe
print ("\nWhite wipe")
led.colorWipe([255, 255, 255])
time.sleep(1)
led.colorWipe([0, 0, 0]) #turn off the light
print ("\nEnd of program")
except KeyboardInterrupt:
led.colorWipe([0, 0, 0]) #turn off the light
print ("\nEnd of program")
๐ Buzzer Test
โถ Run
sudo python test.py Buzzer
โ Result
Buzzer sounds for about 3 seconds
Code
from Buzzer import *
buzzer=Buzzer()
def test_Buzzer():
try:
buzzer.run('1')
time.sleep(1)
print ("1S")
time.sleep(1)
print ("2S")
time.sleep(1)
print ("3S")
buzzer.run('0')
print ("\nEnd of program")
except KeyboardInterrupt:
buzzer.run('0')
print ("\nEnd of program")
buzzer.run(cmd)
This function has one input parameter. If the input is โ1โ, the buzzer will be turned on. If the input is โ0โ, the buzzer will be turned off.
๐ท Camera Test
โ Setup
Edit config:
sudo nano /boot/firmware/config.txt
Enable:
camera_auto_detect=1
Or manually configure if needed.
โถ Run
cd ~/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server
python camera.py
โ Result
An image file (image.jpg) is generated under
/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/Code/Server

Checklist
โ
I2C devices detected
โ
Servos move correctly
โ
ADC shows voltage
โ
Ultrasonic returns distance
โ
LED cycles colors
โ
Buzzer works
โ
Camera captures image
๐ก Tips
- Keep hands away from moving parts
- Most issues are caused by wiring mistakes
- Press Ctrl + C to stop any test
โ Once everything passes, you're ready to move on to full robot control and programming!
๐ Next:
๐ฎ Letโs Control Your FreeNove Robot Dog!







