Receiving MIDI message using Arduino

Hi,
I have a Casio electric piano which sends MIDI using USB type A, and I want my Arduino UNO board to receive MIDI,
Anyone got an idea how to build the circuit?
Thanks


Receiving a MIDI In signal to an Arduino. Use 4N28 Optocoupler (Fritzing doesn't have this component in it's library)..

I searched up and found this, but it uses MIDI cable, not USB A cable.
:confused:

To do what you want you have to use a USB host shield, as your Arduino has to look like the USB controller inside a PC and not one in a peripheral.

But if I use a USB host shield, would the code "MIDI.read();" read the MIDI?
How to I make MIDI.read(); to read the message from USB HUB?

If you use a USB host shield, there will be examples of the software to make it look like a MIDI host. This will depend on what shield you choose. The examples will tell you that.

This problem is more complex than you think and will involve you writing your own software. Look at what host shields you can get and what software they come with.


Is it possible to find something that can replace [THIS]??
This is the exact thing I'm looking for.
Maybe a USB to Serial TTL Adapter can replace it?

Maybe a USB to Serial TTL Adapter can replace it?

No.

What is wrong with that?

Umm,
It's too expensive and shipping is a big problem for me.
So I want an alternative.

In your other thread https://forum.arduino.cc/index.php?topic=588045.0 you claim that you already have a USB Host Shield.

There's something very strange going on here.

Steve

yeah I got a USB Host Shield, but I couldnt get it read by the Arduino, and I was thinking if can I get something like that USB HOST board. So I can get my project work.

I got a USB Host Shield, but I couldnt get it read by the Arduino,

That is altogether a different problem. I doubt if the MIDI libiary will work with a host shield read my reply #4 again.

Do not cross post - I have reported your other post to a moderator.