Getting Started with the Autonomous Kit for the Sphero RVR

Pages
Contributors: santaimpersonator
Favorited Favorite 3

Software Overview: Part 3 - Sphero SDK

Note: Users should use head over to the Sphero's SDK webpage for details on the SDK's functionality. Additionally, Sphero also has a support page in case users get stuck.

This section will focus on getting started with the Sphero SDK.

  1. To begin using the Sphero SDK, users should change the current working directory to the sphero-sdk-raspberrypi-python folder using the following command:
    • cd ~/sphero-sdk-raspberrypi-python
  2. Once inside the sphero-sdk-raspberrypi-python folder, users will need to spawn a shell in a virtual environment using the pipenv shell command.
    • This will create a virtual environment if one doesn't already exist.
    • This is the most important step to initializing the Sphero SDK; otherwise, users will run into issues executing any of the examples.
  3. After the shell has been activated, users can begin to start using the example code. Navigate around to find a code example.
  4. To run a Python example code, use the following command:
    • python3 <File Name>.py
  5. Exiting:
    • Use Ctrl+C to interrupt the keyboard control script.
    • To exit the virtual environment shell, type exit or Ctrl+D.