Book Image

Hands-On Robotics with JavaScript

By : Kassandra Perch
Book Image

Hands-On Robotics with JavaScript

By: Kassandra Perch

Overview of this book

JavaScript has an effective set of frameworks and libraries that provide support for embedded device programming and the robotics ecosystem. You’ll be able to put your JavaScript knowledge to work with this practical robotics guide. The book starts by guiding you in setting up an environment to program robots with JavaScript and Rasberry Pi 3. You will build beginner-level projects, such as a line-following robot, and then upgrade your robotics skills with a series of projects that help you get to grips with the Johnny-Five library. As you progress, you’ll learn how you can improve your projects by enabling advanced hardware components and programming concepts. You’ll even build an advanced AI-enabled robot, connect its NodeBots to the internet, create a NodeBots Swarm, and explore Message Queuing Telemetry Transport (MQTT). By the end of this book, you will have enhanced your robot programming skills by building a range of simple to complex projects.
Table of Contents (19 chapters)
Title Page
Dedication
Packt Upsell
Contributors
Preface
Index

Troubleshooting your motorized projects


But what if your motor doesn't turn? Here are a few things to check if your motor isn't spinning around:

  • Is the battery pack for the motor hat turned on? Don't laugh, I've spent many a minute wondering why it wasn't working only to discover it lacked power. There's a power light on most motor hats that let you know it has power:

The power LED on the Adafruit hat is just above the screw terminals for the external power, and lights up red

  • Are your batteries fresh? Motors take up a lot of power, and extended use can wear them down pretty fast.
  • As I mentioned in the first chapter: check your wiring. Then, check it again.
  • Make sure all of the wires are securely fastened in the correct screw terminals so that a light yank cannot dislodge them.
  • Are you using rechargeable batteries? If so, I admire your commitment to reuse, but you're going to want 6 rechargeable running your motor due to differences in voltages between rechargeable and non-rechargeable batteries...