Help with designing PID controller for a BLDC motor with ESC

Hi, I am working on a project to make a autonomous lawnmower and would like to design a pid controller for the blade motor. I am completely new to arduino and i dont know where to begin. I understand the basic principle of a PID controller but i do not know how to implement it, both as a code or onto the actual arduino. Any advice will be well appreciated.

I am having trouble simply turning the motor on using the ardunio. I have posted the pictures of the motor, ESC and arudio with this post. If you have any further questions, please do not hesitate to ask.

I have been told the motor will need to rotate the blade at 5400 rpm.