Help With Trinket M0 Project

Adafruit's tiny microcontroller platform. Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
conderjscott
 
Posts: 1
Joined: Tue Jun 28, 2022 12:28 am

Help With Trinket M0 Project

Post by conderjscott »

Forum Folks,

I have a MIDI foot controller that I want to use with a guitar amp. The amp has a USB port but no MIDI DIN connectors. Both have USB-B "device" connectors only.

Using adaptors to connect the controller directly to the amp did not work. So I started reading about the need for a MIDI controller in between.

As a test, I ran the foot controller via USB to my PC and used a MIDI utility to echo it out to the amp via USB. That works great, but it was only for testing purposes. Carrying a PC around to go in the middle is not worth the effort.

I found a project on the hackaday site called "USB Host MIDI for Two" that uses two Trinket M0's to do what I believed I needed to do - provide host controller functionality to both of my devices.

I built the device and went through flashing the Trinkets to the best of my understanding using a file I downloaded from the github project. But it's not working with my devices.

I must admit that I'm very limited in my programming ability. I know that you guys did not post the project, but the person who did has not responded to my inquiry. So I thought I would see if someone here could take a look at the info on the github page for the project and see what I might be able to do to get it working. You guys would know more about what you're looking at than I do.

Here are some points that left me uncertain:
  • On the project home page there are two links for firmware. But, as far as I can tell, you can only flash one file to the Trinket M0's. So I'm not sure if I downloaded the correct uf2 file from github or if I was supposed to somehow incorporate more than one. I downloaded the file MIDIUARTUSBH.ino.trinket_m0.uf2 from this page.

    I can connect my foot controller and run MIDI CC into the project from either Trinket and I can see pulses on the UART TX lines using an oscilloscope. But apparently the Trinkets don't put the MIDI commands out the USB connector.

    There is a revision of the code called "Update USB host MIDI to make MIDI thru controlled by pin 0." I have tried grounding pin 0 since it looks like that's required to pass thru MIDI. That didn't fix the problem.
So I would appreciate your help getting my project working more than you know.

Thanks.

Scott

User avatar
FailingTinkerer
 
Posts: 14
Joined: Tue Dec 15, 2020 8:09 am

Re: Help With Trinket M0 Project

Post by FailingTinkerer »

I think you downloaded the right file.

Do you have a picture of how you wired up the two M0's?

Do both trinkets run the same file?

As far as I understand it works like this:
[Midi device A] -usb-> [M0 A] -UART-> [M0 B] -usb-> [Midi signal]

MIDI 2.0 is bidirectional, so if you're using MIDI 1.0 it probably won't work.

Locked
Please be positive and constructive with your questions and comments.

Return to “Trinket ATTiny, Trinket M0”