6

Measuring Movement with Encoders on Raspberry Pi Pico

Robots don’t just run code blindly; they need sensors. What sensors do we add first? Our robot already has some sensors on board, and in this chapter, we’ll see how to use them.

We finished the previous chapter noticing that timing isn’t the most accurate way to determine robot movement. So, let’s see how our first sensor, encoders, can improve this. Encoders are the first step in getting accurate movement and location estimation in robots. We will also learn one of Raspberry Pi Pico’s excellent features – Programmable IO (PIO).

We’ll dig into movement fundamentals, odometry and encoding, look at Raspberry Pi Pico PIO in CircuitPython, and use this to get data from the encoders on our robot. ...

Get Robotics at Home with Raspberry Pi Pico now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.