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

Thread: USB Type Combinations for Teensyduino 1.29

  1. #1
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,078

    USB Type Combinations for Teensyduino 1.29

    Someday I'm going to make a GUI for building any combination, but for Teensyduino 1.29 (and likely the rest of 2016) we're going to have only fixed combinations in the Tools > USB Type menu.

    1.29 will bring Audio, Touchscreen, and (maybe) MTP Disk. That's at least 3 more entries in the menu.

    I'm considering adding maybe 5 or 6 more USB Type menu options for popular combinations. But which combos would be most useful? I know Keyboard only (without Mouse+Joystick) has been requested several times. I seem to recall MIDI+Serial has been asked several times as well.

    Now's the time to suggest other combinations. Links to old threads where someone had the edit the USB code, or specific projects will weigh more heavily on my decision making....

    Here's the Tools > USB Type menu I'm considering so far for 1.29:

    Click image for larger version. 

Name:	screen.png 
Views:	168 
Size:	131.5 KB 
ID:	7024

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,029
    I can't find the cite, but I thought in the Prop Shield Beta thread, or the separate Teensy Transfer thread, Frank B complained that it would be useful to have a RawHD + Serial combination. I could also see maybe moving Serial to be its own menu item, so that it could be added to any of the other modes to allow for debugging.

    Perhaps a "give me everything" combo might be useful.
    Last edited by MichaelMeissner; 04-24-2016 at 01:31 PM.

  3. #3
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,280
    Yes.

    Is it possible to add checkboxes to the menu?

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,078
    Quote Originally Posted by Frank B View Post
    Is it possible to add checkboxes to the menu?
    Not really. At least not without a major patch to how Arduino works. Those menus and all the code in Arduino's prefs and build system is designed to have each menu as a selection on 1 item from the list.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,078
    Quote Originally Posted by MichaelMeissner View Post
    I could also see maybe moving Serial to be its own menu item, so that it could be added to any of the other modes to allow for debugging.
    All the modes without Serial have a HID interface which emulates serial, so you can still print to the Arduino Serial Monitor.

  6. #6
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,150
    Quote Originally Posted by PaulStoffregen View Post
    All the modes without Serial have a HID interface which emulates serial, so you can still print to the Arduino Serial Monitor.
    I would prefer if there were a simple "USB_AUDIO + SERIAL" and not only "USB_AUDIO + MIDI + SERIAL".

    Also I would need the usb_dev.c with "tSAmFreq, bNrChannels, bSubFrameSize, bBitResolution" values other than "44100, 2,2,16"

    It is already frustrating not being able to use directly the Audio library (due to restriction to 16 bit and 44100 Hz and splitting channels), maybe the usb_audio interface can be kept more flexible. Sure, I can edit usb_dev.c but then syncing with gitbub will become difficult.

    I recall that in the past there was some talk to have a more flexible usb descriptor table, so maybe it is now time to revisit this issue.

  7. #7
    Senior Member
    Join Date
    Jul 2014
    Posts
    139
    Quote Originally Posted by MichaelMeissner View Post
    I could also see maybe moving Serial to be its own menu item, so that it could be added to any of the other modes to allow for debugging.

    Perhaps a "give me everything" combo might be useful.
    I second this; Serial as a separate menu (nice to have, I can see reasons against it) and "give me everything" (essential to cover any combination).

    Am I right in saying that in modern OSs, all the USB modes the teensy can do have built in OS drivers? I certainly have had a seamless experience on Windows 10 on any of the USB modes. I mention this because then rather than fill the USB mode menu with many variants, you could have a logical set of commonly used items (like you have now) and the "give me everything" option which would still install quickly and easily because the OS has all the drivers built in.

    I would use 'Raw HID + Serial' during development though admittedly I haven't had any issues with the emulated serial.

  8. #8
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,078
    Quote Originally Posted by WMXZ View Post
    ... there was some talk to have a more flexible usb descriptor table, so maybe it is now time to revisit this issue.
    No, now is not the time. I'm going to leave the descriptor table and overall code structure as-is until the K66-based board is fully released *and* after I've been able to make much-needed improvements to the website. Significantly restructuring the core library now would set everything else back needlessly.

    But I am taking a little time to add these extra USB types that have been requested many, many times over the years. Doing them within the existing code structure is a much smaller task than also rearranging everything.

  9. #9
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,280
    Paul,

    is it somehow possible to add an optional file in the project-directory which overrides the settings in the ide ?

    Something like this would allow more experienced users to write their own options-file and they could store defines like teensy-model, F_CPU, Usb-Type (here perhaps with single usb options like "Serial, Audio, Keyboard, HID, MIDI...") without having to set this again and again and again...


    I don't know how much effort this would be, perhaps its easy(?) - perhaps not.


    If that is not possible, or too much work:

    For the USB-Type single -Defines per type. Then a user can edit the Boards.txt and add his own type with combining -Defines...
    for example "-DUSBSerial -DKeyboard"


    Just two ideas. The website and Teensy 3.x are more important



    Edit: It would be great if the user could - for eample - store #defines for Serial-buffer-size and other settings, too - without having to edit core- or library- files.
    Last edited by Frank B; 04-25-2016 at 10:01 PM.

  10. #10
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    Could I ask for a USB MIDI + Keyboard option (with or without serial)? I have my own usb_desc.h file for just this type, so its no big deal, but every time I update teensyduino I have to redo the file. Doing MIDI and keystrokes is handy for DAW control / shortcuts and for playing mame and doing music on the same controller

    Thanks for all the amazing things you are doing.

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    24,078
    Would the upcoming touchscreen emulation be worthwhile for the DAW control scenario?

  12. #12
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    Quote Originally Posted by PaulStoffregen View Post
    Would the upcoming touchscreen emulation be worthwhile for the DAW control scenario?
    Oh yes it would... I've been following this thread quietly, just thinking how cool it would be for daws.

    On the other hand though, there is something about a physical fader and a knob or two to twiddle. "The point" of leaving the mouse alone is to have the tactile 'real console' analog experience (or maybe that is just me).

    So, it would depend a lot on the 'feel'[!] of the touchscreen ... how it reacts, its accuracy, its ability to display daw feedback .... You would have to have a reasonably large screen for bumble fingered people like me and for accuracy's sake too ....but generally, I would think that people would jump at it!! No futzing with wiring up buttons and faders ... you could do an all in one implementation 'right on the screen'.

    If it were only a couple of midi/osc assignable buttons, it would be great ... chuck in a slider / ribbon type arrangement and you would have a pretty cool controller / instrument .... I'm sure thereminguister is thinking ahead to a touch ribbon keyboard-type setup.

    I do come back to real knobs and sliders, though ....

  13. #13
    Junior Member
    Join Date
    May 2016
    Posts
    8
    It may be too late for 1.29, but I'd like to see a RAW HID configuration without the emulated serial. I've just started using Teensy, and most of the tools I use for RAW HID comms for previous projects don't play well at all with a composite device with multiple HID endpoints.

    Update, 17 May 2016: I made my own USB Type, and posted my recipe here: https://forum.pjrc.com/threads/34541...641#post104641
    Last edited by jerwood; 05-17-2016 at 05:50 PM.

  14. #14
    Senior Member adrian's Avatar
    Join Date
    Oct 2015
    Location
    Wellington, NZ
    Posts
    504
    @jerwood thanks for this ... very helpful and timely (for me)

Posting Permissions

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