I want to make a try for the MIDI library as that: use the Easy MIDI controller in my cell phone to send MIDI message via the bluetooth, and display the message in the LCD, howerver, when I click the key in my phone(piano mode),there is no response in the LCD. I have modified the baud rate of the bluetooth to 115200. If I use serial port directly, I can see information like this ('1 53 110 1 57 0'), unlike the correct MIDI message, Does anyone give me a hand to see what happened? Thanks!
#include <MIDI.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,2,3,4,5,6,7,8,9,10);
void setup(){
lcd.begin(16,2);
Serial.begin(115200);
MIDI.begin();
MIDI.setHandleNoteOn(functionNoteOn);
MIDI.setHandleNoteOff(functionNoteOff);
lcd.clear();
lcd.print("Hello,Cathy Lee!");
}
void loop(){
delay(1000);
MIDI.read();
}
void functionNoteOn(byte channel,byte pitch,byte velocity){
lcd.print("NoteOn:");
lcd.print(channel);
lcd.print(' ');
lcd.print(pitch);
lcd.print(' ');
lcd.print(velocity);
lcd.print(' ');
}
void functionNoteOff(byte channel,byte pitch,byte velocity){
lcd.print("NoteOff:");
lcd.print(channel);
lcd.print(' ');
lcd.print(pitch);
lcd.print(' ');
lcd.print(velocity);
lcd.print(' ');
}