I have attached the main code of whole project.

esp 32 arduino ide flysky fsi6x