|Learn Robotics with Raspberry Pi|
Author: Matt Timmons-Brown
Robots are exciting and with a subtitle "Build and Code Your Own Moving, Sensing, Thinking Robots" this book make it seem all the more exciting. The back jacket guidance is that is for "Ages 10+" and with its full colour photos and lots of text in capital letters, it does have the feel of a book aimed at pre-teens.
The problem is that building anything like a robot requires a lot of different skills. You have to be able to build things, you have to be able to create and work with electronics and you have to be able to program. That is a lot to learn before you can get started. Of course, with the help of a book you can pick up the different skills as you build. You can't learn enough electronics or programming to become a master, but you can get started. Before I go any further, I need to say that the "Thinking" in the subtitle is a hype - no robot or AI is anywhere near "thinking".
The book gets started with Chapter 1, where else, on the basics of Raspberry Pi - getting set up and working with SSH. It also introduces Python 3 which is used for all of the programs in the book. Most of this you can find elsewhere and if you get stuck the Pi community forums have lots of help. Chapter 2 is a crash course in electronics - current, voltage, Ohm's law and finally how to blink an LED. For a beginner's book it is good that it does tell you how to calculate the series resistor.Even so, you're not going to "get" electronics from one example of a current limiting resistor.
After this brief preliminary skills tutorial we move on to the robots proper. Chapter 3 starts work on a simple robot base. The construction is best described as Lego plus bits and pieces. This is a reasonable way to start. You do get some guidance in what to buy, but it isn't absolutely specified - a pair of brushed DC motors, for example, or perhaps you can find some with wheels like in the photo. The lack of a precise parts list will annoy some, but it does give you freedom to be creative. You are told what is required and it is up to you to sort out the details.
Of course, this is also where we hit the need to power the motors from one voltage and the Pi from another. The solution is to use a voltage regulator and this is specified as an LM2596 - but this is the number of the chip that the module uses. The exact module isn't specified, except as a photo. If you search on Amazon or eBay then you will find the exact module used, but there are many alternatives which might confuse the beginner. A voltage regulator module is cheap and so much easier to work with than trying to build your own from components, but this is a pattern followed in the rest of the book. The motor controller, for example, is an L293D chip rather than four transistors. For the beginner this is probably the best way to do things, but it does make everything into a black box.
This is also the point in the book where the circuits start to get a little more complicated and they are drawn out as realistic sketches of the prototyping board, complete with colored wires. Why not schematics? Reading a wiring diagram is a fundamental skill that has to be learned. Not only this, but it can be easier to see the logic behind the wiring on a schematic. This isn't the first beginner's book I've seen that avoids schematic diagrams - is there a rule about this, like not putting math into a popular science book because it cuts your audience?
In the next chapter things get even more sophisticated in that we use a Nintendo Wiimote as a remote controller. The Python code for everything is given with reasonable explanations, but it is built on top of the GPIO Zero Library so again it is a black box approach. Chapter 5 adds an ultrasonic module to allow the robot to automatically avoid obstacles. I can recall building the same thing using ultrasonic transducers when I was back at the same stage - how expectations change. Chapter 6 adds lights and sound and Chapter 7 implements a line-following robot with a pair of light sensors.
As you reach the final chapter you might be feeling disappointed that we haven't encountered any sort of AI. How can this be a thinking robot without AI? The final chapter fills in the missing part with the use of the camera and OpenCV to make the robot follow a colored ball. Not really thinking, but a notch up on line-following.
The book ends with some appendices on soldering, the GPIO lines and resistor color code.
This is a book that would probably need adult supervision for younger readers. It might well provide enough information to said adult to guide the projects to a good conclusion. It is not so much that at the end of the book the reader has a good grasp of all of the topics - more a hope that enthusiasm has been stimulated. This is a slim book tackling a big subject and as far as it goes it is good and fun.
To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.
|Last Updated ( Tuesday, 05 March 2019 )|