Zumo 32u4 wall follower

Hi all, I’m new here.

I recently got a Zumo 32u4 and for my first project I wanted to make the zumo follow the wall/bookshelves etc of my apartment. Later I will make it plot coordinates and calculate the area of the room. But at the moment I’m struggling to make my zumo follow the wall.

I can make the zumo go forwards from where I set it off and stop when it’s left proximity sensor is less than 6 (past a corner). But that proximity of 6 never seems to be the same, and is not very precise (6=2-10 cm from the wall, 5=11-20, aprox.) Is there a way to make this more accurate? I’d like the zumo to skirt the room <5cm from the wall.

I could make the zumo do lots of small arcs, continuously bumping into the wall (collision detection) as it goes around the room, but that sounds like a horrible idea, ha!

  1. Is there a way to fine tune the left proximity sensor? so the range from 0-6 is between 0-10cm or something?

  2. Has anyone made a wall follower before with the 32u4?

Thanks for any help!
Matt

Hello, Matt.

As explained in the “Proximity sensing” section of the user’s guide, our example code operates the proximity sensors by transmitting pulses on both the left and right LEDs at six different brightness levels. The output numbers are the number of brightness levels for the LEDs that activated the sensor. You might be able to measure distance more accurately by modifying our library or making your own program that controls the LED brightness.

However, also keep in mind the Zumo’s proximity sensor readings can be influenced by many factors other than distance (e.g. size and reflectivity). Ultimately, they may not be accurate enough on their own for your application, so you might consider adding other more precise range finding sensors to your Zumo, like one of our time-of-flight sensors.

- Patrick