So I'm trying to make an Arduino Uno read a MIDI Devices output, basically read what keys are pressed from a piano that uses USB Type B as a MIDI connection. So how do you do it?
there is an exemple to drive a MIDI device from an Arduino board.
Unfortunately, it uses pin and not USB.
You should take a look at it and maybe use it as a start.
not sure at all with ATMega based board.
I know for sure 33 BLE has dedicated functionnality (and examples in IDE) to mimic a USB peripheral (keyboard, game pad etc...).
I am not skill enough to affirm if it is possible with your bare bord.
the data is sent in the data+, right?
do you mean in the MIDI player example I proposed you?
If yes, the first commented lines in the code give you configuration
do you know where I connect the Data (-)?
not clear to me (and I am not using MIDI myself).
what is the data + and - ? the 2 wires to cmmunicate between midi and nano?
if we are tlaking about the IDE example, the circuit is described in the first line of the sketch:
The circuit:
- digital in 1 connected to MIDI jack pin 5
- MIDI jack pin 2 connected to ground
- MIDI jack pin 4 connected to +5V through 220 ohm resistor
- Attach a MIDI cable to the jack, then to a MIDI synth, and play music.
hope it helps.
EDIT: I know the example is not what you looking for, but it seems I can't help you more.
Anyway, I hope someone with better skills would help you with your config.
well thanks
No, Arduino Uno can't read the data from USB, regardless of the type of connector or from the data wires itself. You need a USB host shield for it.
Wrong.
USB data is sent on both the + and - wires as a differential signal. It is nothing like serial data as sent over the serial port, that is called asynchronous serial data.
There is a complex rapid exchange of messages involved before any data can be exchanged.
I've only ever used the original 5 pin DIN type MIDI, so I can't tell you much about USB MIDI.
In order for your Uno to communicate with another USB device, you need to have what is known as a USB Host Shield.
There is a library to use a USB host shield with MIDI, details are here
You could always buy one of these:-
USB Host MIDI
My real goal here is to make it read the data from the piano, then, which then will send that data to the led strip controller and tell it what key is pressed and basically have it change colors.
The top image is the led controller I made.
That is why I posted the link in my last post. That is what you need to get in order to read the USB data from your keyboard and transfer it to your Arduino.
I see now, thanks
Btw, can I use a USB Host Shield instead? Because that's the only thing I can really buy from the stores I buy from and I also don't know if that website can support our countries location.
... instead of what?
Oh wait you already said it




