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
Click the magnifying glass in the top right corner of the screen and type “terminal” to find the terminal app
Replace the text “pibot##” with the label on the PiBot
ssh-keygen -R pibot##.local
Replace the text “pibot##” with the label on the PiBot
ssh-keyscan pibot##.local >> ~/.ssh/known_hosts
Replace the text “pibot##” with the label on the PiBot
The password to enter when prompted is “DogsAndCatsAreNice2.” without the quotes. The '.' at the end is important!
ssh pi@pibot##.local
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
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