We can now test the sensors out for real. Power up the Pi and motor board and log in.
First, we'll need another library—this time a more general library for talking to devices and sensors connected via the GPIO. Install this on the Pi:
pi@myrobot:~ $ pip install gpiozero
GPIO Zero is a library designed to make interaction with devices attached to the Pi GPIO very simple. It has lots of good examples and documentation on the internet. We will be using it where our hardware does not require more specialist libraries.