Here you can find the code for tracker:
https://kukuruku.co/post/diy-an-astr...in-two-nights/
(some parts of it are not necessary as they are for LCD)
Another one:
https://www.jjrobots.com/projects-2/startracker/
Google search results in many more projects like those...