problem using arduino leonardo with midiUSB

hey,
I'm building a project that sends Midi data that im getting from a potentiometer with arduino nano via NRF2.4.
im using Arduino Leonardo for getting the data and sending it at midi port with a MIDI USB library.
My problem is that the arduino duplicates my leonardo port and doesn't send the data (sometimes it sends it).
I tried to change the cable and the NRF but i guess its not my problem.
thank u.

You sent me a PM about this. The reason I did not read your Topic is because its Title refers to MIDI and I know nothing about that.

As far as the nRF24 side of things is concerned have a look at this Simple nRF24L01+ Tutorial.

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

There is also a connection test program to check that the Arduino can talk to the nRF24 it is connected to.

A common problem with nRF24 modules is insufficient 3.3v current from the Arduino 3.3v pin. The high-power nRF24s (with the external antenna) will definitely need an external power supply. At least for testing try powering the nRF24 with a pair of AA alkaline cells (3v) with the battery GND connected to the Arduino GND.

If you are using the high-power nRF24s (with the external antenna) make sure there is sufficient distance between the two nRF24 so that the signal does not overwhelm the receiver - try 3 metres separation. If you are new to nRF24s it may be better to start with a pair of low power modules with the pcb antenna.

Note, also that the SPI pins for a Leonardo are not the same as for an Uno. The details are in the Reference section for the SPI library.

…R