Book Image

Getting Started with Raspberry Pi Zero

By : Richard Grimmett
Book Image

Getting Started with Raspberry Pi Zero

By: Richard Grimmett

Overview of this book

Raspberry Pi Zero is half the size of Raspberry Pi A, only with twice the utility. At just three centimeters wide, it packs in every utility required for full-fledged computing tasks. This practical tutorial will help you quickly get up and running with Raspberry Pi Zero to control hardware and software and write simple programs and games. You will learn to build creative programs and exciting games with little or no programming experience. We cover all the features of Raspberry Pi Zero as you discover how to configure software and hardware, and control external devices. You will find out how to navigate your way in Raspbian, write simple Python scripts, and create simple DIY programs.
Table of Contents (16 chapters)
Getting Started with Raspberry Pi Zero
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Planning your path


Now that you have a wheeled or tracked vehicle, you may want to do some basic path planning. To do this, you need a framework to understand where your robot is and determine the location of the goal. One of the most common frameworks is an x-y grid. The following diagram is an example of this type of grid:

There are three key points on this grid that you need to understand. Here is an explanation of them:

  • The lower left point is a fixed reference position. The directions x and y are also fixed and all other positions are measured in relation to this position and these directions. Each unit is measured with regards to how far the unit travels in time in a single unit.

  • Another important point is the starting location of your robot. Your robot will then keep track of its location using its x and y coordinates, the position with respect to some fixed reference position in the x direction, or the position with respect to some fixed reference position in the y direction to the...