Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi Pico Software Serial Rx pin issue #909

Open
kizimka opened this issue Mar 26, 2023 · 2 comments
Open

Pi Pico Software Serial Rx pin issue #909

kizimka opened this issue Mar 26, 2023 · 2 comments

Comments

@kizimka
Copy link

kizimka commented Mar 26, 2023

Hi Pieter, thank you so much for your efforts with this great library!

So, the issue that I am facing, that is a whole program freeze when receiving MIDI on Software Serial RX pin on Pi Pico board.
TX pin works perfectly.

Have to use SoftwareSerial as I ran out of all hardware serial communications
I am using Raspberry Pi Pico Arduino core by Earle F. Philhower, III

#include <Control_Surface.h>
#include <SoftwareSerial.h>

// Set up a new SoftwareSerial object (rx, tx)
SoftwareSerial Serial3(3 , 2);

// Create MIDI interfaces
HardwareSerialMIDI_Interface midi2{ Serial3, MIDI_BAUD };
//I also tried SerialMIDI_Interface - same behavior


void setup() {
 	Serial3.begin(); //without this, even output(tx pin) not working, but whole loop still freezes on incoming MIDI

	// Initialize
  	Control_Surface.begin();
 	midi2.begin();
}

void loop() {
      Control_Surface.loop();
      midi2.update();
}

Thank you in advice!

@kizimka
Copy link
Author

kizimka commented Apr 10, 2023

Any suggestions?:(

@Trickster-git
Copy link

#include <Control_Surface.h>
UART Serial2 (8, 9, NC, NC);
USBMIDI_Interface usbmidi;
HardwareSerialMIDI_Interface serialmidi = {Serial2 , 31250};
MIDI_PipeFactory<6> pipes;
serialmidi >> pipes >> usbmidi;
serialmidi << pipes << usbmidi;
// serialmidi << pipes << serialmidi; // if maine usb interface need coment
void setup(){
Control_Surface >> pipes >> usbmidi;
Control_Surface << pipes << usbmidi;
Control_Surface >> pipes >> serialmidi;
Control_Surface << pipes << serialmidi;
usbmidi.begin();
serialmidi.begin();
Control_Surface.begin();}
void loop(){
usbmidi.update();
serialmidi.update();
Control_Surface.loop(); }

it works on arduino mbed os rp2040 boards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants