I don't know if you are new to embedded coding, but your code is missing a lot, maybe you should start all over again, You can go with online tutorials on youtube.