Book Image

Arduino By Example

By : Adith Jagadish Boloor, Adith Jagdish Boloor
Book Image

Arduino By Example

By: Adith Jagadish Boloor, Adith Jagdish Boloor

Overview of this book

Table of Contents (18 chapters)
Arduino by Example
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Programming the robot


Programming the robot is the hardest task in this book. It is not only about simply writing code and hoping for the best. Technically, you can use that technique and still get away with it, but it would consume a huge amount of time and energy. We will go through the prior art again, see how a dog (and a robot dog) walks, and try to mimic some of that motion. We will also look at the mechanical design of our robot and see how it can be upgraded for better performance.

Weight distribution

Funnily enough, it makes sense to put this in the programming section. This is because weight distribution and the creation of the walking motion go hand in hand. Before programming the bot, we will have to power it. Since we have made our circuit in the previous chapter, we just have to put it in place on the robot, such that the weight of the battery and the Arduino MEGA is evenly distributed.

First, let's take a look at the battery (the larger one):

This is the heaviest object that the...