I tried to compile the LeoJoy sample code but I got this error message:
'dataForController_t' does not name a type
in the orange area of the Arduino program window and many error messages in the black area of the Arduino program window. How can I fix the problem? I wish to use Arduino Leo board as a joystick when plugged into my desktop computer. Also, I think that the Processing editor/compiler doesn't support 64-bit serial. I have Windows 7 Home Edition 64-bit.
I haven't studied the code in detail but from what I saw already I guess that the developers changed the base libraries of the Leonardo to include the new functionality. You don't have to upload a new bootloader, you get the support by uploading any new sketch compiled with the new board selected.
I think that I got the Leonardo board working as LeoJoy board but I didn't connect any pots to the board yet. I connected pins D2-D12 and A0-A5 to ground and the buttons lighted up in the Game Controller Properties window.
Have you changed these lines in the example code? (Remove the "128; //")
// Set the analog sticks
// Since analogRead(pin) returns a 10 bit value,
// we need to perform a bit shift operation to
// lose the 2 least significant bits and get an
// 8 bit number that we can use
controllerData.leftStickX = 128;// analogRead(A0) >> 2;
controllerData.leftStickY = 128;//analogRead(A1) >> 2;
controllerData.rightStickX = 128;//analogRead(A2) >> 2;
controllerData.rightStickY = 128;//analogRead(A3) >> 2;