In Chapter 13, Introducing the Raspberry Pi Robot Car, we built our T.A.R.A.S robot car. At the end of the chapter, we discussed how we could control T.A.R.A.S through code. In this chapter, we will start writing code to do just that.
We will start out by writing simple Python code, and then utilize the GPIO Zero library to make the car wheels move forward, move the servo motors holding the camera, and light up the LEDs at the back of the robot car.
We will then organize our code using classes, before enhancing it further, as we send T.A.R.A.S off on a secret security mission.
The following topics will be covered in this chapter:
- Taking a look at the Python code
- Modifying the robot car Python code
- Enhancing the code