Thanks to the book 'Code in Python — let's create an adventure game', each of you has learned the basics of programming using Python, whether a student, teacher or parent. Now it's time for the next step...
We're placing a Code in Python PAD in your hands, which we hope will encourage you to deepen your knowledge of the Python language. We expect you'll have fun along the way. Not so bad, right? :)
At first glance, our PAD looks like some kind of weird controller for a game console. In fact, it can serve this role. If it's plugged into a computer, you can use it to control characters in games just as you would with a standard controller pad. Our controller has one analogue joystick and five buttons, which, for many games, is more than enough. However, the Code in Python PAD has many additional features not present in standard controllers. This is what makes it different from other, seemingly similar devices.
First of all, the large matrix of LEDs may catch the eye. You can write short programs in Python to draw and animate various shapes on the matrix. The controller also has a small speaker that can produce basic but fun 'old-school' sounds.
On the left side of the controller, you'll find a discreet and mysterious connector. This is the controller's expansion port, to which you can connect various modules. We'll be able to communicate with attached modules by writing simple Python programs.
You're probably wondering what modules are available; here are a few: tilt sensor/gyroscope, light/colour sensor, input/output expansion, servos, stepper motors, DC motors, distance sensors, motion sensors, RGB LEDs, temperature/humidity/pressure sensors... as you can see, there is quite a range!
The Code in Python PAD requires no drivers or additional power source. It comes equipped with a USB cable for connecting to your computer. The following steps will show you how it works.
So we can start working with the PAD quickly, without complication, we have chosen a simple and friendly working environment — the Mu editor. Install it, and we're ready to go!