Who is this Book For Learn Robotics with Raspberry Pi is a book for anybody who is interested interested in robots programming and electronics No assumptions are made about ability and I steer well clear of confusing unexplained jargon throughout People of all ages and backgrounds can learn something from the easy-to-follow projects and guidance Where should y ou Buy p arts Over the course of this book and the projects it contains you’ll need various bits and pieces electronic components making materials and a few more tools Don’t worry though everything is affordable and widely available There will be specific advice in each chapter but in general everything you need can be picked up online on sites such as eBay and Amazon All of the electronic components in the book can be purchased from online shops like eBay https www ebay com or dedicated online electronics stores such as Adafruit https www adafruit com Pimoroni https shop pimoroni com The Pi Hut https thepihut com CPC Farnell http cpc farnell com and RS Components http uk rs-online com web This list is by no means exhaustive and you may find cheaper closer online retailers in your own country You might even be fortunate enough to have a local electronics hardware hardware store where you can grab your stuff I’ll introduce and explain the exact parts you’ll need in each pro ject but here’s a full list of everything you’ll use in the book Chapter 1 Raspberry Pi 3 Model B HDMI cable USB keyboard mouse 5 V micro USB power adapter 8GB microSD card 400-point breadboard Chapter 2 An LED with appropriate resistor M-F F-F M-M jumper wires Momentary push button
Two brushed 5 V to 9 V motors with tires Chapter 3 A chassis for your robot I make mine out of LEGO Six AA battery holder Six AA batteries I recommend rechargeable LM2596 buck converter module L293D motor driver chip Chapter 4 Nintendo Wii remote For earlier models Bluetooth dongle for Pis prior to Model 3 Zero W Chapter 5 HC-SR04 ultrasonic distance sensor A 1 kΩ resistor and a 2 kΩ resistor Chapter 6 NeoPixel stick with headers A small 3 5 mm speaker Chapter 7 Two TCRT5000-based infrared line-following sensor modules Chapter 8 An Official Raspberry Pi Camera Module A colored ball You’ll also find these tools materials handy along the way Variety of screwdrivers Hot-glue gun Multimeter Soldering iron Wire stripper Sticky tack Velcro 3M Dual Lock let’s Get started In short robots and Raspberry Pi are awesome Now that that’s out of the way and we’re acquainted it’s time to get going Just turn the page to begin your robotic adventures
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