New Gamepad Feature

49 views
Skip to first unread message

vorpalrobotics

unread,
Dec 2, 2019, 1:17:10 PM12/2/19
to Vorpal Robotics Forum
Hello,

I just updated the gamepad code to add a minor new feature. Some DPAD modules use a different button coding than usual. There's no way to tell by looking at the DPAD module which button coding it uses. Both kinds are labelled Keyes_AD_Key and bear the KB45037 model number.

Even the wholesaler I buy from sometimes sends me the alternative coding version, and this different version seems to be becoming more and more prevalent. It might even happen that at some future date we won't be able to get the current kind anymore.

So I decided to fix the problem by having the code support both kinds of module.

HOW IT WORKS

1) If you hold down the "special" DPAD button (the one that's all the way on top of the module) while booting the gamepad, then the gamepad auto-detects which kind of module you have. 
You need to keep holding down the button for about two to three seconds following boot to be sure it gets detected. The gamepad then saves this value in EEPROM. So you only need to do this once after building a gamepad (or after swapping DPAD modules).

2) If you don't hold down the top button, the gamepad looks in EEPROM and uses any previously stored value.

3) If no value has ever been stored in EEPROM, the gamepad defaults to using the standard coding that we've been shipping for the past few years.

DO I NEED TO UPGRADE TO THIS NOW?
If your DPAD is working fine, then no.  If you ever swap your dpad with one you buy from places like aliexpress or banggood, you might need this depending on which dpad module you get.

WHERE IS THE NEW CODE?

This new version of the code is now up on github and is also now considered the current version in the VORPAL FILES shared folder (http://tinyurl.com/VORPALFILES)  Go to the CURRENT_RELEASE folder.

Under the current release folder, in the EXP folder (experimental) there is also a version where the alternative coding is the default.

The gamepad manual is being updated with this information sometime this week, and the build instructions will be changed to recommend booting the gamepad while holding down the special button the first time after you build the gamepad. Again, you only need to do this once (or whenever you swap to a new DPAD module).

I have a lot of great new software features planned for a January release, more on that a few days from now.

Enjoy!
Reply all
Reply to author
Forward
0 new messages