# Troubleshooting a midi controller arduino uno r3

**URL:** <https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375>\
**Category:** Programming\
**Created:** [April 7, 2023, 9:44pm UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375 "2023-04-07T21:44:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooip123](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@mooip123](https://forum.arduino.cc/u/mooip123)\
**Post date:** [April 7, 2023, 9:45pm UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/1 "2023-04-07T21:45:00Z")

</div>

hey guys, so i recently acquired an arduino uno r3 and decided to see if i could make something out of it, to cut a long story short i was following the nerd musician on youtube and used his code to make a 3 button controller with a pot, that had inspired me to make my own 10 button midi controller with a pot to be able to control the velocity, now i am a new to coding with the arduino but had managed to persuade chat gpt to help write the code for me, i do understand i little bit about code considering i have and engineering background, so with this code i acquired i loaded it into the ide and got my arduino set up in place, loaded the code and install the midi library, it is mostly working in the ide but on the serial monitor i am getting messages like the one pictured any help would be greatly appreciated

 ![ide serial monitor](https://europe1.discourse-cdn.com/arduino/original/4X/5/2/c/52cb5b85ae2bc92098bade740e63e3fd0c118b74.png)

---

<div class="post-metadata">

**Author:** ![PieterP](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@PieterP](https://forum.arduino.cc/u/PieterP)\
**Post date:** [April 7, 2023, 11:05pm UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/2 "2023-04-07T23:05:37Z")

</div>

You can't print to the serial monitor while sending MIDI.  
The Arduino UNO is not a great choice for a MIDI controller, because it is connected to your computer using a single UART. Either you use that UART for printing messages, or you use it for sending MIDI, but if you try to mix both, the software on the other end will get confused.

What you're seeing in the serial monitor is the binary MIDI data that your program sending. The serial monitor can only display text, not MIDI data, hence the strange characters, indicating encoding errors (because MIDI data is not valid ASCII/UTF-8).

See [Control Surface: MIDI over USB](https://tttapa.github.io/Control-Surface-doc/Doxygen/d8/d4a/md_pages_MIDI-over-USB.html) for alternatives.

---

<div class="post-metadata">

**Author:** ![mooip123](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@mooip123](https://forum.arduino.cc/u/mooip123)\
**Post date:** [April 7, 2023, 11:24pm UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/3 "2023-04-07T23:24:18Z")

</div>

sorry i forgot to mention that this is being shown in a debug mode, so what your saying is that its getting confused and using midi and serial at the same time

---

<div class="post-metadata">

**Author:** ![gilshultz](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gilshultz](https://forum.arduino.cc/u/gilshultz)\
**Post date:** [April 8, 2023, 2:19am UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/4 "2023-04-08T02:19:06Z")

</div>

I would suggest using another Arduino such as the Mega which has several (4) hardware serial ports.

---

<div class="post-metadata">

**Author:** ![jfjlaros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jfjlaros/32/716915_2.png) [@jfjlaros](https://forum.arduino.cc/u/jfjlaros)\
**Post date:** [April 8, 2023, 11:28am UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/5 "2023-04-08T11:28:48Z")

</div>

> [@PieterP](#):
>
> You can't print to the serial monitor while sending MIDI.

I have had some success with [this library](https://serialmux.readthedocs.io) running multiple protocols over the same serial connection (only tested with Linux hosts).

---

<div class="post-metadata">

**Author:** ![mooip123](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@mooip123](https://forum.arduino.cc/u/mooip123)\
**Post date:** [April 14, 2023, 1:52pm UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/7 "2023-04-14T13:52:12Z")

</div>

if i where to write the code with serial.print instead of midi.send would this make a difference as i am going to be using hairless which to my understanding is a serial to midi converter

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [October 11, 2023, 1:52pm UTC](https://forum.arduino.cc/t/troubleshooting-a-midi-controller-arduino-uno-r3/1112375/8 "2023-10-11T13:52:42Z")

</div>

Closed on October 11, 2023, 1:52pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
