Hat switches
These functions are designed to set up a switch with directional inputs as a hat switch. Windows will recognize this as a switch with directional inputs, as opposed to just buttons with numbers.
Typical switches are the Alps RKJX - family.
Remember stating the amount of hat switches in 8_Joystick, or else your hat switch wont be recognized at all.
funkyHat()
Sets up a hat switch. Does not need button numbers.
void funkyHat(int8_t row, int8_t colUp, int8_t colRight, int8_t colDown, int8_t colLeft, int8_t hatNumber)
Fill in the row all the funky pins go to and then up/right/down/left, in that order. Lastly the hat switch #. If you have two hat-switches, one will have to be #1, and one #2.
funkyHat(2,1,3,4,2,1);
None
Last updated