Browse Source

Update Test example slightly

main
PaulStoffregen 7 years ago
parent
commit
c70cf5fef6
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      examples/Test/Test.ino

+ 6
- 4
examples/Test/Test.ino View File

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());

Loading…
Cancel
Save