Sphero Public SDK

Sphero Public SDK

  • Getting Started
  • How To
  • Documentation
  • Get the Code
  • Samples
  • Troubleshooting
  • FAQs

›Python SDK Setup

Starting with Raspberry Pi

  • Intro
  • Python SDK Setup

    • 1. Python SDK Setup (Quick Start)
    • 1.a. Python SDK Setup (Advanced)
    • 2. Setting Up Raspberry Pi OS
    • 3. Using the Terminal
    • 4. Using SSH
    • 5. Connecting to RVR+
    • 6. Test it!

    First Programs

    • Hello World - Starting Python
    • Hello RVR+ - LED Control
    • Go Driving

    Optional Steps

    • Choose Your Python Version
    • Using Pipenv

Additional Resources

  • Troubleshooting

3. Using the Terminal

❗️
important

This page is primarily for users who started with Sphero's preconfigured SD card image, as described in the Quick Start Instructions. If you are already familiar with using the terminal on your Pi, you can skip to SSH setup.

Open the terminal

You'll be using the terminal on your Pi to enter commands. From the desktop, click the icon shown in the toolbar at the top of your screen to open the terminal:

Raspberry Pi Terminal

Run a command

Let's check our Python version. In your terminal, type the following and then press enter:

python3 --version

There, you just ran your first command in the terminal! It should have printed the Python version to the terminal as shown below:

Terminal check Python version

❗️
important

Notice that the command was python3, not python. Without the 3 you'll run Python 2.x.x, which is incompatible with the RVR+/RVR SDK. If you didn't start with the Sphero preconfigured SD card image, you might see a different version here. That's okay as long as it's 3.5.3 or higher.

Some Common Bash Terminal Commands

When you use the terminal, you are interacting with a program called a shell. The default shell in Raspberry Pi OS is bash. The following commands are all bash commands, but many are common to other shells, such as zsh.

CommandSyntaxDescription
cdcd <newPathcd stands for Change Directory. Used for navigating to a different directory specified in <newPath>.
mkdirmkdir <newDir>Make Directory. Creates a new directory named <newDir> within the current working directory.
lsls <dir>List contents of the current working directory (with no arguments).
List contents of directory <dir> if specified. <dir> may be a relative or absolute path.
sudosudo <command>Superuser Do. Some commands require elevated security permissions to run. For those, use sudo in front of the command.
nanonano <file>Opens the nano text editor, which allows you to edit files inside the terminal. If <file> is specified, nano will open it for editing.
💡
tip

The more you use bash, the more comfortable and efficient you will become. One helpful feature is bash autocompletion. Press the Tab key to auto complete partially-typed command sequences.

Learning More

If you're new to using Bash, the Raspberry Pi Foundation has a fun Pac-Man treasure hunt on the terminal tutorial that will help you get comfortable hacking in the terminal.

Next!

Proceed to the next section to set up SSH on your Pi to be able to access your Pi's terminal from another device.

← 2. Setting Up Raspberry Pi OS4. Using SSH →
  • Open the terminal
  • Run a command
  • Some Common Bash Terminal Commands
  • Learning More
  • Next!
Sphero Public SDK

Wanna stay informed about Public SDK efforts and releases?

Sphero
Public SDK LicenseAbout Sphero Public SDKSphero.comSphero EDU
Community
Sphero CommunityThingiverseTwitterInstagramFacebook
More
RedditLinkedInGitHubStar
Copyright © 2022 Sphero