1 GETTING UP AND RUNNING THIS BOOK WILL TEACH YOU HOW TO BUILD YOUR VERY OWN ROBOTS THIS EXCITING ADVENTURE WILL INVOLVE ALL SORTS OF ELECTRONICS MAKING AND PROGRAMMING
Over the following chapters I’ll guide you through everything you need to know how to do from connecting LEDs buttons batteries and motors to getting your robot to follow lines giving it sensors to see the world and more You’ll use a Raspberry Pi in all the projects to come so now that you know what one is let’s get your Pi set up Get Your Hands on a raspberry pi Before you can proceed you’ll need a Raspberry Pi of course The Raspberry Pi is available worldwide so it should be easy to buy one no matter where you live At the time of writing there are several different Raspberry Pi models available The two most up-to-date ones are the Raspberry Pi 3 Model B and the Raspberry Pi Zero The former is the updated classic 35 Raspberry Pi shown in Figure 1-1 This is the board I’ll be using throughout this book as it’s the best option for develop ment it has more full-size connectors This saves you from fiddling around with the adapters and USB hubs that you’d need for the Pi Zero Figure 1-1 The Raspberry Pi 3 Model B The Raspberry Pi Zero is a stripped-down smaller board that retails for just 5 The Pi Zero W is identical except that it’s the wireless version meaning it’s equipped with Wi-Fi and Bluetooth capabilities and retails for 10 The Zero and Zero W are shown in Figure 1-2 You might be wondering why we’re not using the smaller more compact Pi Zero After all a smaller board would take up less space so you could make a robot smaller or have space for more hardware
But if you’re using the Pi Zero you’ll need USB and HDMI adapters for the miniature ports to plug in USB devices or a monitor which is more challenging These adapters have to be purchased separately too When you have some more experience in the field of robotics you may decide that it’s worth using a Pi Zero for one of your later projects when that time comes go for it If you already have an older model of the Pi don’t worry The version of Raspberry Pi you have doesn’t really matter since all of them are cross compatible and you can use any of them to build the robots in this book The only difference is that you’ll need adapters for things like your wireless internet connection Table 1-1 gives the different specs for each model model Raspberry Pi 3 Raspberry Pi Raspberry Pi ram processor ports price Model B 1GB 64-bit quad-core 1 4GHz HDMI 4x USB 2 0 Micro-USB power CONNECTIVITY Wi-Fi Bluetooth Ethernet 35 Zero 512MB 32-bit Zero W 512MB 32-bit single-core single-core 1GHz 1GHz Mini-HDMI Micro-USB data Micro USB power None Mini-HDMI Micro-USB data Micro USB power Wi-Fi Bluetooth 5 10 Figure 1-2 The Raspberry Pi Zero left and Raspberry Pi Zero W right table 1-1 Main Raspberry Pi Model Specification Comparison
If you don’t have a Raspberry Pi yet I recommend buying a Raspberry Pi 3 Model B There are sometimes new versions of the Pi but great care is taken to ensure that they are all backward compatible compatible meaning they work with earlier versions so you’ll be able to follow along with this book even if a later version has been released You can find a distributor for your country on the Raspberry Pi Foundation website https www raspberrypi org products Your First taste of pi When you see your Raspberry Pi for the first time you might find yourself bewildered You probably associate a normal computer with a screen keyboard mouse and storage but the Raspberry Pi is a little different Unbox it and you’ll find a bare-looking board with all sorts of components sticking out of it If you have a Pi 3 B it should look exactly like Figure 1-3 Later versions might look slightly different but they all have the same basic features MICROSD CARD SLOT GPIO PINS PROCESSOR USB PORTS note Raspberry Pi is not the only platform or computer you can build robots with but it is one of the easiest and most accessible ways of doing so Figure 1-3 A top view of the Raspberry Pi 3 Model B 5 V MICRO USB POWER HDMI CAMERA CONNECTOR ETHERNET