Teensy 4.0: need an example of using USB host

Status
Not open for further replies.

Andy Belov

Well-known member
I want to connect a MIDI keyboard to the USB host on Teensy 4.
Just can' t find any examples of reading from it.

If anybody has an example of reading data from the USB Host (D+/D-) port on Teensy 4.0, please send it my way.

Thanks.
 
Found it:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\USBHost_t36\examples\Serial\MIDI\InputFunctions

I just got the connector and the current limiter. Will try it this weekend.

Thank you.
 
Andy did you figure it out. I am a beginner that biught the 4.0 n a whif, without looking ahed to all the diifculties it could pose. Please How do you suggest I connect a midi keybaord to the teensy so I can send out cv and gate signals to a diy analog synth that recieves it. Thank you
 
Hi Orhema,

Here is the USB host schematics: USBhost.jpg

Here is the PCB: USBhostPCB.jpg

Install Teensyduino from here: https://www.pjrc.com/teensy/teensyduino.html
Look into this example: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\USBHos t_t36\examples\Serial\MIDI\InputFunctions

Should be enough to get you started. I mostly shows how to receive MIDI signals from a keyboard, but I think the "...16x16" example shows how to send.
 
Hi Orhema,

Here is the USB host schematics: View attachment 18200

Here is the PCB: View attachment 18201

Install Teensyduino from here: https://www.pjrc.com/teensy/teensyduino.html
Look into this example: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\USBHos t_t36\examples\Serial\MIDI\InputFunctions

Should be enough to get you started. I mostly shows how to receive MIDI signals from a keyboard, but I think the "...16x16" example shows how to send.

Thank you Andy. I was lurking in the forums and just found out the usb host functionality just became available for the 4.0. However it seems it still cant be used as a USB device. Also please I would like to ask if the Teensy can be used as a USB Hub
 
Status
Not open for further replies.
Back
Top