How can i create a speedometer using Atmega16 Microcontroller?

I have knowledge about using DC motor and LCD Interfacing in AVR(Atmega16) Microcontroller. I am working on a project "A line follower robot". I have almost completed my project, just want to add speedometer into it.
Please help!
Thanks in advance!

iceng4 months ago

Do you slow for strong sharp turns ?

rickharris4 months ago

Take pulses from the wheels and count them over a known period. Then do the maths to give speed as per ICENG formula.

Alternativly if you don't want to tie down the controller counting pulses use a second ATmega to count and pad calculate then pass the speed to the main controller.

iceng4 months ago

Speed = distance / time_traveled.