-
Notifications
You must be signed in to change notification settings - Fork 267
The problem of MIDI library running on NodeMCU board based on ESP8266 #199
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
Comments
Can you show me your NodeMCU code please ? |
#include <MIDI.h>
//-----------------------------------Midi setting------------------------------------------------------------
struct MySettings : public midi::DefaultSettings
{
static const unsigned SysExMaxSize = 1024; // Accept SysEx messages up to 1024 bytes long.
//static const bool UseRunningStatus = true; // My devices seem to be ok with it.
};
//MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, MIDI);
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial,Serial,MIDI,MySettings);
//-----------------------------------Midi setting------------------------------------------------------------
void
setup()
{
MIDI.begin(MIDI_CHANNEL_OMNI); //midi
MIDI.turnThruOff(); //Thru
}
void loop()
{
MIDI.sendNoteOn(1,127,1);
MIDI.sendNoteOn(2,127,1);
MIDI.sendNoteOn(3,127,1);
delay(1000);
} |
I see nothing in your code or the ESP8266 Serial documentation that would indicate incompatibility. Are you using pin GPIO1 for MIDI output ? |
Yes, I use the default serial output, GPIO1 and GPIO3 |
At least the hardware connection is okay. The PC can receive MIDI signals, but the MIDI signals are incorrect. I think the problem may occur in the software, but I don’t know where it is... |
What I don't understand is your Arduino screenshot: the serial output does not correspond to the code that sends 3 NoteOn messages (the serial output indicates NoteOn and NoteOff). |
Sorry, I changed the test code after that. The code actually burned to Arduino is the data of the serial portArduino board is no problem. It's a screenshot of 8266. The data received by the serial port is incorrect. For example, the node on should be 90-1-127Actually received 20-01-ff
On 02/05/2021 22:02, François Best wrote:
What I don't understand is your Arduino screenshot: the serial output does not correspond to the code that sends 3 NoteOn messages (the serial output indicates NoteOn and NoteOff).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello, is there any progress on the problem of running simple noteOn on 8266 and not receiving correctly? I studied for a day, but found nothing, I don't know where the problem is. |
I don't have a lot of time to look into this at the moment, also I don't have an ESP8266. What happens if you send serial messages directly, like: byte counter = 0;
void setup()
{
Serial.begin(31250);
}
void setup()
{
Serial.write(counter++);
delay(500);
} |
Maby there is something wrong with the terminal program? I use Protokol with UART1 on a ESP32 to a Midi-Interface and it works. Resistors for 3V3 and Midi out had to be set to 33 Ohm for 3V3 pullup and 10 Ohm for TX out. #define UART1_TXD GPIO10 // UART_DEV(1) TxD |
Finally, the test came out, but the root cause is still unclear. After all, I'm not a hardware major. |
Hello, I am using this MIDI library, this is a very good library.
But now there is a problem
For example, simply send note on in a loop. If running on arduino uno, the serial port baud rate is set to 31250, the serial port debugging software can receive the correct midi signal, but the same code, running on the NodeMCU board based on ESP8266, does not The correct MIDI, is it a problem with my settings or the board?
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: