Servo motor with 3 push buttons and 2 limit switches

Why does nobody ever read the advice that they are directed to when they first log in ?

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination