Programming functions

Hey guys I was wondering how I would program a robot to work with a controller. Like what function would I add to have a motor move when I push a button. I’m using easy 4 cortex. Any video/pdf file will help

I got joystick done, but I need to use find how to program a button.


Number 7&8 to be extract