Pololu sensor reading without normalization and potential speed gains?

Hello. I am trying to build an advanced line follower and maze solver robot using polulu QTR-13RC sensors. At lower speeds I can easily detect a 90 degree turn and break out of my PID loop to handle it, or even handle cross or T-intersections. All of this changes when I rerun at higher speeds. At higher speeds I usually miss these detections. I am using an ESP32-S3 running at 240Mhz with a 800RPM motor and 65mm wheels.

I was thinking about whether the code could be improved to help alleviate these missed line pattern detections. I noticed that to normalize the sensor values, it is divided by a denominator which is usually (max - min) for each sensor. Can this division be avoided to save some computation to speed up the sensor reading code and hence have better pattern detections at higher speeds. (Note that the bot travels straight but still misses these detections at higher speeds).

Hello.

To avoid confusion, please note that our company name is Pololu, not “Polulu” (I have corrected it in the title of your post).

We’d expect the division to take a negligible amount of time, so the limiting factor is probably something else. If you post your code and a short clip showing the robot on the course, we can take a look and see if we have any suggestions.

Brandon