Install and Setup

Pygame Zero allows you to create simple games using Python. Learn how to configure your environment below.

Prerequisites

If you are brand new to Pygame Zero, be sure to review their introductory material here before moving on.

Install Pygame Zero

In order to use Pygame Zero, you first have to install it. You do this in the same way you previously installed the Phidget22 library. Simply navigate to your package manager, search for pgzero and press install!

Thonny

If you're using Thonny, select Tools > Manage Packages and search for pgzero.

PyCharm

If you're using PyCharm, select File > Settings > Python Interpreter and use the + symbol to install pgzero.

PyScripter

If you're using PyScripter, select Tools > Tools > Install Packages with pip and enter pgzero.

Create Project Structure

Create the following project structure on your computer in the location of your choice.

Download the following files and place them in the appropriate location.

Finally, create a new python file named phidgets_pygame.py and save it in the same location

Next Steps

Follow the link below to the Pygame Zero Projects page and select a Device Tutorial.

What are Phidgets?

Phidgets are programmable USB sensors. Simply plug in your sensor, write code in your favorite language and go!

Phidgets have been used by STEM professionals for over 20 years and are now available to students.

Learn more

Set your preferences

Windows

Mac OS

Raspberry Pi

Java

Python

C#

Swift

NetBeans

Processing

Eclipse

Thonny

PyCharm

PyScripter

Visual Studio

Xcode

Setting your preferred operating system, programming language and environment lets us display relevant code samples for the Getting Started Tutorial, Device Tutorials and Projects

Done