|
|
|
|
|
|
|
|
while (!Serial) ; // wait for Arduino Serial Monitor |
|
|
while (!Serial) ; // wait for Arduino Serial Monitor |
|
|
Serial.println("USB Host Testing"); |
|
|
Serial.println("USB Host Testing"); |
|
|
myusb.begin(); |
|
|
myusb.begin(); |
|
|
keyboard1.attachPress(press); |
|
|
|
|
|
keyboard2.attachPress(press); |
|
|
|
|
|
|
|
|
keyboard1.attachPress(OnPress); |
|
|
|
|
|
keyboard2.attachPress(OnPress); |
|
|
midi1.setHandleNoteOff(OnNoteOff); |
|
|
midi1.setHandleNoteOff(OnNoteOff); |
|
|
midi1.setHandleNoteOn(OnNoteOn); |
|
|
midi1.setHandleNoteOn(OnNoteOn); |
|
|
midi1.setHandleControlChange(OnControlChange); |
|
|
midi1.setHandleControlChange(OnControlChange); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void press(int key) |
|
|
|
|
|
|
|
|
void OnPress(int key) |
|
|
{ |
|
|
{ |
|
|
Serial.print("key "); |
|
|
|
|
|
|
|
|
Serial.print("key '"); |
|
|
|
|
|
Serial.print((char)key); |
|
|
|
|
|
Serial.print("' "); |
|
|
Serial.println(key); |
|
|
Serial.println(key); |
|
|
//Serial.print("key "); |
|
|
//Serial.print("key "); |
|
|
//Serial.print((char)keyboard1.getKey()); |
|
|
//Serial.print((char)keyboard1.getKey()); |