Help Needed for Circuit

Can somebody modify this code from the circuit to be compatible with this electronic speed controller provided below?
Link to ESC: https://www.amazon.com/YoungRC-Brushed-Electric-Speed-Controller/dp/B07MX3514Y/ref=pb_allspark_dp_sims_pao_desktop_session_based_4/134-2183374-2482939?pd_rd_w=rNl1T&pf_rd_p=e896123b-6614-49c5-873e-d532e726c2f0&pf_rd_r=YVHQ0F7W0ZCBE4W3C89E&pd_rd_r=9a0869d3-5190-4074-b656-689d3929fd5b&pd_rd_wg=64kIo&pd_rd_i=B07MX3514Y&psc=1
Link to circuit code (click code and download the file to modify): How to wire PS2 Joystick two axis module, Submersible Pool Water Pump, Submersible Pool Water Pump to Arduino Mega