usb host shield, usb keyboard input...hexadecimal?


howdy. thank time.

http://www.circuitsathome.com/mcu/hid-support-for-usb-host-shield-library-2-0-released

i using oleg's usb host shield library , sparkfun usb host shield read usb keyboard.

i running , modifying oleg's keyboard sketch (linked @ below) print appears hexadecimal values.
here's example of oleg's output:

code: [select]
00001a0000000000
dn      >1a<
ascii: w
0000000000000000
up      >1a<
0000080000000000
dn      >08<
ascii: e
0000000000000000
up      >08<
00000b0000000000


i'm not interested in ascii characters.
what want have arduino interpret keyboard array of 89 tact switches, each of send own midi note (except couple, modifiers). means must learn how use hexadecimal values printed.

i have ever coded "regular ol numbers" , never hexadecimal...i use tim twillman's midi library (does hard part).
is there way me cut corner , include sneaky line converts hex representations decimals me?

here sketch modifying.

https://github.com/felis/usb_host_shield_2.0/blob/master/examples/hid/usbhidbootkbd/usbhidbootkbd.pde

am dreamin, or going easy as

code: [select]
if(key  == 1a){do stuff}

??

edit, spent time reading whats , whys of hexadecimals, , why "conversion" isn't necessary. have things try when i'm @ desk tomorrow, hinging on above "what if"


Arduino Forum > Using Arduino > Programming Questions > usb host shield, usb keyboard input...hexadecimal?


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial