SRA-VJTI / sra-board-component

ESP-IDF component for SRA Board
https://sravjti.in/sra-board-component/
MIT License
36 stars 20 forks source link

Add LSA calibration #75

Closed Krishna-13-cyber closed 1 year ago

Krishna-13-cyber commented 1 year ago

This PR adds the calibration for line sensor readings during the initial phase of the run.The calibrated readings gives us the black and white margins when the bot is placed on the maze/flex rather than passing hard-coded margins for different factors.This method helps in increasing precision for getting the accurate lsa readings when lighting conditions and mazes are varied.

VedantParanjape commented 1 year ago

Overall I feel this change won't be useful at all. As you are finding max min when the bot is not running. The max min might change as the bot goes ahead.

gautam-dev-maker commented 1 year ago

We tried this on a live bot and discovered that when calibrated, there is a minor shift in the threshold, resulting in improved performance. Additionally, this API gives the user the option to calibrate. They are free to utilise it or not.

VedantParanjape commented 1 year ago

I think the improvement is just a placebo effect? But okay. Also, practically, this can cause quite many new bugs, say a bright flash during calibration causes the max value to be 4096, this will be difficult to debug as well.

VedantParanjape commented 1 year ago

Closing this for now.