I have written program where I control line follower with pid regulator. I also have analog sensors which are measuring line position. I did it with function analogRead(). Of course I know that it takes a few to measure analog and digital reading is much faster. But my question is: Is it possible to speed up measuring voltage with analogRead() or I have to make new pcb with comparators and measure by function digitalRead()?
You can use a faster ADC clock rate, although there may be some loss of precision. The details depend on which Arduino you have.
I have arduino nano A000005. I think that it could work because values between white line and black are considerably different.
I don't know what that is. There are half a dozen different Arduino "Nanos", so please use the accepted name, or post a link to the product page.
The analog inputs can be used as digital inputs without any processor change other then code. Since you have a good visual definition why use analogRead()? Looking at the schematic you did not post it appears that would solve your problem.
That is the "classic" Nano using the ATmega328 chip. This excellent tutorial includes a discussion of how to change the ADC clock rate.
Thank you for your answer.