Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Teensy 4.0: need an example of using USB host

  1. #1
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    77

    Teensy 4.0: need an example of using USB host

    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.

  2. #2
    Senior Member
    Join Date
    Nov 2017
    Location
    Belgium
    Posts
    154
    Arduino filemenu->Examples->USBHost_t36->Serial->MIDI->InputFunctions.ino

  3. #3
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    77
    Found it:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\USBHos t_t36\examples\Serial\MIDI\InputFunctions

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

    Thank you.

  4. #4
    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

  5. #5
    Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    77
    Hi Orhema,

    Here is the USB host schematics: Click image for larger version. 

Name:	USBhost.jpg 
Views:	13 
Size:	132.7 KB 
ID:	18200

    Here is the PCB: Click image for larger version. 

Name:	USBhostPCB.jpg 
Views:	8 
Size:	168.6 KB 
ID:	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.

  6. #6
    Quote Originally Posted by Andy Belov View Post
    Hi Orhema,

    Here is the USB host schematics: Click image for larger version. 

Name:	USBhost.jpg 
Views:	13 
Size:	132.7 KB 
ID:	18200

    Here is the PCB: Click image for larger version. 

Name:	USBhostPCB.jpg 
Views:	8 
Size:	168.6 KB 
ID:	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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •