| Serial.println("USB Host Testing"); | Serial.println("USB Host Testing"); | ||||
| myusb.begin(); | myusb.begin(); | ||||
| keyboard1.attachPress(OnPress); | keyboard1.attachPress(OnPress); | ||||
| keyboard1.attachRawPress(OnRawPress); | |||||
| keyboard1.attachRawRelease(OnRawRelease); | |||||
| keyboard2.attachPress(OnPress); | keyboard2.attachPress(OnPress); | ||||
| midi1.setHandleNoteOff(OnNoteOff); | midi1.setHandleNoteOff(OnNoteOff); | ||||
| midi1.setHandleNoteOn(OnNoteOn); | midi1.setHandleNoteOn(OnNoteOn); | ||||
| //Serial.println(); | //Serial.println(); | ||||
| } | } | ||||
| void OnRawPress(uint8_t keycode) | |||||
| { | |||||
| Serial.print("raw key press: "); | |||||
| Serial.println((int)keycode); | |||||
| } | |||||
| void OnRawRelease(uint8_t keycode) | |||||
| { | |||||
| Serial.print("raw key release: "); | |||||
| Serial.println((int)keycode); | |||||
| } | |||||
| void OnNoteOn(byte channel, byte note, byte velocity) | void OnNoteOn(byte channel, byte note, byte velocity) | ||||
| { | { | ||||
| Serial.print("Note On, ch="); | Serial.print("Note On, ch="); |