RVR Distance Control

I’ve been having a good amount of success with RVRs “Drive forward for _ seconds” block in the EDU app, but it has been quite time consuming finding out how far it will go each time, leading to a lot guess and checking. As the RVR is very precise, would it be possible to command it to move # feet (or meters) in a direction? It would make everything way easier since I could just measure how far i want it to go and plug that into the app. Or if not, is there a way to convert its 0-255 speed into m/s? That would make the math a lot easier.

Also, because it has so many sensors, I was wondering if one of them would be able to retrace its path. For example pushing it a certain distance, taking it back to the start, and then having it automatically retrace its steps. I know this might be far fetched, but since it can stabilize, it must have some sort of orientation and movement tracker that could record the data to use in a future run. It’s just an idea, and might not be possible, but since asking won’t hurt, I might as well do so.

1 Like

That would be a fun thing to implement :smiley:

One of the challenges with us giving you a speed in m/s or having you be able to ask RVR to go a certain distance is that different terrains/terrain grades can affect RVR’s travel (though we are still working on these capabilities). With that said, have you looked at the velocity and acceleration graphs that are produced after your program is run? Those can also be found in the three dot menu in the program editing screen, under “Sensor Data”. Using the information there may help you with your calculations :blush:

We are also working on a retracing steps example program for RVR! Because, as I mentioned in my other response to you, MakeCode hasn’t approved our extension, this program doesn’t yet have the RVR components, but it can give you an idea of the general format you could use (putting movements in an array and reversing that array) to accomplish your goal!

Hope you have tons of fun!


1 Like

Ok, yeah, that makes sense. Although you could still make an option for m/s or feet for when it’s used on a smooth, flat surface. (like on a wooden or stone floor.)