1. Need a physical switch in Arduino to trigger function.
2. If after two moves we still get same value, we need to raise an alarm and terminate sequence.
3. In case of limit switches, Both call a same function. However if one limit is reached, we need a provision of moving in opposite direction.
4. This entire sequence to be implemented like a Python Library, which can be called from any program.
5. I suggest to rewrite this code in more organised manner, Now that we have more knowledge and experience. Besides I feel if we use small tags avoiding "_" then we can improve readability of code.
6. If the live feed itself if Black and White, then we should skip first step.
7. All settings to be saved, like in a .ini file or something
8. Training on code, both for Arduino and Python so that I am able to adapt it.
9. Need switches in Arduino to move motor using switches. Its pulses frequency is based on a Potentiometer.
[login to view URL] every calculation we decide about direction to move and steps using interpolation.