[solved] keypad.h data type


hi!

i want use keypad library sending midi messages.
so instead if having characters mapped buttons need have numbers 0 127. problem don't know how change data type (char) integer or byte.

i map keypad char , use switch/case ugly because consumes more processing power.

anyone have idea how this?

code: [select]

char key = 'a';
byte num ;

num = (byte) key;

it called casting variable.

to map key number use array.


Arduino Forum > Using Arduino > Audio > [solved] keypad.h data type


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'