
Note that you should see a new generic HID device and a specific Game controller device. The proper functioning of the joystick can be checked by opening the Windows Control Panel on your PC and inspecting the USB HID device list. Windows will automatically install device drivers when the USB joystick device is first connected to your PC.

Joystick.update(throttle, rudder, x, y, buttons, hat)

Hat = (i > 8) & 0x07 // value 0.7 or 8 for neutral Some other ST F103 examples are here and here. The reference at the end of this page should help you get started. Note that the Nucleo's need a specific USB device lib to work with the Joystick lib that is presented here.Some (non-mbed) boards may default to a not so accurate internal oscillator that is not stable enough for reliable USB communications Note that the USB hardware engine needs an accurate internal clock of 48 MHz.Note that the filtering networks 33R/18pF on D+/D- are recommended, but sometimes not present on a board.

Check the hardware schematic of your (non-)mbed boards and modify accordingly. The Nucleo doesnt have the pullup by default. In this case the pullup is switched by T2 which is controlled by the LPC1768 chip. Here is an example schematic from the mbed LPC1768 USB section. That allows enabling or disabling the USB communication under software control.
