howdy. thank you for your time.
http://www.circuitsathome.com/mcu/hid-support-for-usb-host-shield-library-2-0-released
i am using Oleg's usb host shield library and the sparkfun usb host shield to read a usb keyboard.
i am running and modifying Oleg's keyboard sketch (linked at the below) to print what appears to be hexadecimal values.
here's an example of Oleg's output:
00001A0000000000
DN >1A<
ASCII: w
0000000000000000
UP >1A<
0000080000000000
DN >08<
ASCII: e
0000000000000000
UP >08<
00000B0000000000
i'm not interested in the ASCII characters.
what i want is to have arduino interpret the keyboard as an array of 89 tact switches, each of which will send its own MIDI note (except for a couple, which will be modifiers). this means i must learn how to use the hexadecimal values that are printed.
i have only ever coded with "regular ol numbers" and never with hexadecimal...i use tim twillman's midi library (does the hard part).
is there a way for me to cut this corner and include a sneaky line that converts the hex representations into decimals for me?
here is the sketch i am modifying.