KevsRobots Learning Platform
By Kevin McAleer, 2 Minutes
sudo raspi-config, choose Interface Options > I2C and select Yes.Check the Pi can see the PCA9685:
sudo apt install -y i2c-tools python3-smbus
i2cdetect -y 1
You should see 40 in the grid. That’s the PCA9685’s address.
cd smarslab
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python smars_lab.py
Now open a web browser at http://<your-pi-address>:5000 and use SMARSLab to move the legs. The configure_limbs.py script in the same folder lets you check which PCA9685 channel each limb is on, and wiggle a limb to identify it.
This video explains the walking cycle in Python: which legs move, in which order, so the robot always has enough feet on the ground to stay balanced.
i2cdetect shows an empty gridWhy: The Pi can only talk to the board if both I2C wires go to the right pins
V+ terminalQuick quiz 1 of 2
What I2C address does the PCA9685 normally show up on?
i2cdetect shows 40 for a PCA9685 with the default address. (0x68 is the MPU-6050!)Quick quiz 2 of 2
Why does the PCA9685 need its own power supply for the servos?
You can use the arrows ← → on your keyboard to navigate between lessons.
Comments