alf45tar / PedalinoMini

Wireless and Bluetooth MIDI Foot Controller
GNU General Public License v3.0
484 stars 84 forks source link

TTGO T-DISPLAY USB interface problem #325

Closed bobvc133 closed 2 years ago

bobvc133 commented 2 years ago

define USB_MIDI_IN_PIN GPIO_NUM_21 // SDA

define USB_MIDI_OUT_PIN GPIO_NUM_22 // SCL

define DIN_MIDI_IN_PIN GPIO_NUM_21

define DIN_MIDI_OUT_PIN GPIO_NUM_22

TTGO T- DISPALY Can I define both USB and DIN to use GPIO like this? I would like to use a 2-way toggle switch to select whether to use the USB or DIN interface. Also, have you considered using a multiplexer?

alf45tar commented 2 years ago

You do not need to define DINMIDI as USBMIDI. Connecting the serial port pins to the 2-way toggle switch it is enough.

If you define USB and DIN on the same pins disable one port otherwise PedalinoMini will send every message twice.

Multiplexer do not makes sense for me because you will save only 1 pin.

bobvc133 commented 2 years ago

There is no need to redefine GPIO, directly connect the serial port of TTGO to the 2-way toggle switch, and then connect the DIN interface and the serial port of ARDUINO_PRO_MICRO to the 2-way toggle switch respectively. You can directly select the DIN or USB interface through the 2-way toggle switch. Look at the schematic I drew, right? Snipaste_2022-04-03_11-55-14

alf45tar commented 2 years ago

It should work.

bobvc133 commented 2 years ago

ok i'll try it out on a breadboard when i have time

bobvc133 commented 2 years ago

It should work.

Are you using TTGO to connect ARDUINO_PRO_MICRO? I tested that the TX1 and RX1 of ARDUINO_PRO_MICRO need to be reversed with the TX1 and RX1 of TTGO before they can be used.

bobvc133 commented 2 years ago

It should work.

I found that it is not a problem of reverse connection. It seems that the schematic RX and TX and the physical markings are reversed. When I connected, I looked at the markings on the circuit board. Snipaste_2022-04-03_19-36-29

bobvc133 commented 2 years ago

The interface of the schematic ARDUINO_PRO_MICRO I drew before is reversed, and the following is correct QQ截图20220403195643