close loop control

can I make something like closed-loop control with Arduino? If I have hc-sr04 I can calculate the speed of the car from it and use it as feedback for the set point I add?

Do a search for "Arduino PID library"

UKHeliBob: Do a search for "Arduino PID library"

I will thx