If it ask “Do you want to allow this app to make changes to your device?” click the “Yes” button
The SSID and password for will be filled in by default based on the network your computer is connected to
Click the box next to the “Show password” option to see the Wifi password
If your wireless network doesn't have a password, skip this step and follow the instructions here after finishing the steps below to write the SD Card
If you are outside the United States then use the Wifi country code with the appropriate ISO 3166 alpha-2 country code
The Timezone and Keyboard will be filled in by default based on your computer settings
If you are outside the United States then use the Timezone with the appropriate TZ Database Time Zone
The <version> folder will be something like “0.75”. Use the latest version available.
sudo raspi-config
Answer “yes” or “y” when asked to install extra packages or continue
sudo apt-get update sudo apt-get upgrade sudo apt-get install python3-rpi.gpio python3-pip
sudo pip3 install adafruit-pca9685
mkdir -p ~/pibot cd ~/pibot
wget http://osoyoo.com/driver/picar/picar-basic.py
python3 picar-basic.py
exit
If it asks “are you sure you want to continue” select “continue” to finish connecting
The password to enter when prompted is “DogsAndCatsAreNice2.” without the quotes. The '.' at the end is important!
It may take a couple of minutes while it installs some files on the PiBot
The line numbers are displayed to the left of each line of text and are a feature of the Visual Studio Code editor
Variables are short “words” that can hold values. They allow you to change the value in one place and have it updated in multiple places in the code. They also allow the code to change the value of the variable.
Values are assigned to variables using the '=' character
When you see some text followed by a '(' with some more text and then a ')' that is a function call. The text before the '(' is the function name. The text between the '(' and ')' are parameters that get passed to the function. What the function does is defined by a 'def' in front of the function name somewhere in the code.
Functions allow a common set of steps to be used in many places in the code without having to type in all of those steps each time.
In the definition of the function, the text between the '(' and ')' may be different from when it is called. When the function is called, the variable that is passed to it replaces the name from the definition.
See the Electrical Description section on the previous page for a description of what the pwm does
python3 picar-basic.py
sudo shutdown -h now