The code you shared requires one of the following boards:
However I would strongly recommend that you don't attempt to use the Yun, Uno, or Mega because these boards will require very advanced skills to work with for this particular project (the Uno and Mega are great boards for projects that don't need to emulate a joystick though). I also recommend against trying to use the Due. It is a nice board with lots of pins and good specs, but it is more advanced.
The Pro Micro, Micro, or Leonardo are your best choices. Any of those boards will be an excellent place to start with Arduino.