USB Type Combinations for Teensyduino 1.29

PaulStoffregen

Well-known member
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:

screen.png
 
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:
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.
 
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.
 
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.
 
... 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.
 
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:
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.
 
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 ....
 
Back
Top