1

Schematic resume Hi everyone, first time here on the forum, so, apologies if I'm doing anything incorrectly. Long story short, I built a device that takes voltages in and transform them into midi data. I used an ATMega328P PU and midi data exit through the TX pin of the chip, into an optoisolator and then go to a jack. Everything works great. I decided to make the next step, switching to an ATMega32u4, my main goal is to have those midi data exiting simultaneously out from the jack and from the USB which also act as a power source for the device. The device is now recognized by my laptop as a usb device, so I assume all the USB wiring are correct, however, I have no midi data exiting from any of the jack or usb and I don't understand why. Of course I changed all the pin assignment according to the ATMega32u4 datasheet. I use Arduino IDE for programming and the device is recognized by the IDE as "Arduino Leonardo": it has to be said that I've always used Arduino UNO and Nano, so I don't know if there are any differences in terms of code when it comes to different boards.

My assumption is that, for some reason, TX pin remains silent. I guess there must be something wrong with my code setup: I simply typed

Serial.begin(9600);

Are there any specific Leonardo libraries I have to be aware of?

4
  • 5
    Serial is the USB CDC/ACM port, not the TX/RX pins. You need Serial1 for that.
    – Majenko
    Commented May 31, 2021 at 10:19
  • 2
    We can't really help you properly unless you show us your code. Without that we're only guessing.
    – Majenko
    Commented May 31, 2021 at 10:44
  • 2
    Also, for what it's worth, MIDI carried over USB uses its own device class; it's not normally carried over USB via "Serial" (CDC) class.
    – timemage
    Commented May 31, 2021 at 12:48
  • 1
    arduino.stackexchange.com/tour
    – Juraj
    Commented May 31, 2021 at 12:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.