New 2.x Configurable Keyboard/Gamepad Firmware

Thanks! I’ll certainly swap the Pi to test this theory. A first glance doesn’t show anything suspicious. The solder joints of the headphone connector look fine. Ground is actually soldered twice, and both of them look fine.

If this turns out to be a hardware problem (even though I was able to fix it with software) then I agree it would make sense to move it into its own thread.

Edit: I have put in a brand-new, out-of-the box Raspberry Pi 3, and see the exact same behavior. When I unplug the connector from the Raspberry audio-out, then the board behaves as expected (except for the bouncing).

I also tried a Raspberry Pi 2, and here the results are even weirder:

  • Headphone connected: Stable “1” state (i.e. “0” on the input, which is inverted by your code).
  • No headphone: Very rapid back and forth between 1 and 0

Note that the Raspberry Pi 2 was only connected to the Picade board with the audio cable, not also via USB.

One last edit: My version of the code does not work with a Raspberry Pi 2 properly connected. The pull-up always wins. When I connect or disconnect the headphone, input 5 goes down for a moment, and then up again.

yes, that seems to validate my theory. I’ll PM you troubleshooting steps to confirm, so as not to clutter this topic, then we can post the results here, or better assemble a FAQ that covers all Picade sounds related issues, which I think is needed.

Perfect, thanks!

Back to software ;) After looking heavily into the firmware in order to debug the issue, I was wondering if I could place a few change requests.

  • In the “dump” command, add output for the shift state and the volume level (right after dumping the button configuration).
  • Add a “#define DEBUG 1” or similar to “picade.h”, and then add conditional debug outputs where appropriate. For example I added this to the headphone section:
    #ifdef DEBUG
    Serial.print(F("Headphone state change, new state is: "));
    Serial.println(headphone);
    #endif
  • I don’t yet understand the shift keys. Could you please add a sample configuration that involves one or more shifted buttons?
  • One last thing: Having “Enter” and “Esc” on the right side helps enormously in many of the Retropie menus. It might be a good idea to leave this in place even for the “quickbind_gamepad” default setting.
1 Like

Hi

Is there an update on this as the sound volume fails to restore correctly when I restart my Picade and I have to use the volume up button to restore it. I don’t have headphones attached at anytime.

Cheers

Paul

Sounds like your default volume has been saved as 0, which re-flashing to a different firmware version may fix but is more of a feature than a bug. ( Although they do say a bug is a feature which can’t be turned off )

If you connect to your Picade over serial using the Arduino IDE or otherwise, ramp up the volume to the desired level by sending plusses: ++++ and then save the config by sending s it should get you back to sanity.

Thanks I will try that and let you know what happens.

Cheers

Paul

I’m having the same issue - volume is 0 after each reboot. I’ve tried connecting over serial via Putty to ramp back to 20 and then saving the config, but it doesn’t take - reboot and back to 0. Any other suggestions? Also can’t get the volume to adjust with the buttons any longer, I’m sure I’ve mapped something incorrectly - trying to figure that out, but would appreciate any suggestions there also. Thanks in advance.

Hi

Still the same even though I have saved the volume using ‘s’ on reboot it’s back to zero. If it makes any difference I am using a Pi 3.

Cheers

Paul

I’m not entirely sure what’s going on here, but I’m starting to trickle out beta versions of my work-in-progress so we can hopefully get the ball rolling and home in on a solution. Grab the new firmware here:

If you’ve got a custom config, make sure you’ve use the dump “d” command to back it up, and copied it somewhere safe.

And run the update script like so:

./update picade_b2.3.hex

Hi

I’ve done some testing with this new firmware b2.3 and have found the following.

Sound volume on reboot or shutdown.
Altering the volume with the buttons does not appear to get saved as the value read back from the dump command on reboot / shutdown is not the same as set. However writing either - or + followed by s using the serial connection does now save the value across reboots / shutdowns.

Headphone
Plugging in headphones does not remove the sound from the speakers however there is a slight lowering of the volume. Removing the headphones returns the original speaker volume.

Volume buttons
These only work if you press and release them you cannot keep them pressed to adjust the volume.

Hope the above is of use with debugging the issues.

Cheers

Paula

Hi!

Loaded b2.3:

Sound volume set via serial and saved does now ‘stick’ with a reboot! (yay!)

Still unable to get any adjustment via the buttons, but need to play around more with this.

Thanks for b2.3! Much improved! :)

Hi

Did you remap the volume buttons as I found that by default they are set to ‘u’ and ‘d’. I copied the config from the top of this thread as shown below as I havent changed my bindings from the original defaults. The volume controls are the 250 & 251 values


import serial
picade = serial.Serial(’/dev/ttyACM0’,9600,timeout=1.0)
picade.write(“a 218 217 216 215 128 130 32 129 122 120 115 99 176 177 250 251 105 111 112”)
print(picade.readline().strip())

I could then alter the volume with the buttons but holding them down doesn't increase or decrease the volume you have to repeatedly press them.

Cheers

Paul

This is something I’ll have to fix. The hold-to-adjust was lost when volume was integrated with the rest of the button handling. I’m thinking of some sort of global repeat-rate setting, since it may be useful for other things.

Hi

Thanks and I do remember that being mentioned earlier. Any idea about the headphones?

Cheers

Paul

Not yet, but weirdness with headphones is something I’ve managed to replicate at least.

Ok, I got the updated firmware installed no problem, I just can’t for the life of me get any rebinds to stick.

It took me a while to get python going, I’m still pretty new to linux) but I was finally able to get the picade buttons bound to gamepad buttons. However inside emulationstation I can’t configure the newly bound buttons and upon rebooting everything reverts to the default. I tried both suggestions for the “easy way” and had no success. I don’t have a usb-serial adapter or even any serial ports on my current computer so the hard way is out.

Any idea what I’m doing wrong? I’ve read over your first post a dozen times and searched all the downloaded picade sketch files for further documentation and can’t seem to get it right.

My main goal is to be able to use the picade controls inside the retroarch menu, currently that menu needs a full size keyboard or gamepad to operate correctly.

I have had this trouble and whilst trying to go back to the previous version I broke it. The boot loader seems to be broken. I have some programmers so I can bring it back, maybe over xmas. May also recode that app as it seems a little awkward to use.

Make sure you flash the Leonardo bootloader, I flashed firmware directly via header and lost access to serial tty, once Leonardo boot loader has been loaded then flash picade firmware via usb using update script.

Thanks for the tip. :)

Sorry to bump this old thread. I have successfully reconfigured the Picade PCB to remap some functions and even connected additional buttons to the SPI header.

Now, I would like to connect a two-axis analog stik to two inputs of the picade PCB but, instead of connecting it in place of the regular 4-way joystick, I would like to maintain both the digital and analog joysticks. So, I was thinking to connect the two analog axis in place of to side buttons (which I don’t use) but, for this to work, the input pins in the PCB should accept analog inputs. I know several pins in the Arduino Leonardo support both analog and digital inputs but I wonder if the Picade firmware also supports this.

Would this be possible? Which PCB pins accept analog inputs?

Thanks!