Hi,
i'm new in Arduino-programming and my first project is a midi controller which has to control a drum machine.
Various Piezo's are connected to the AnalogInputs and a MIDI-Signal is to be sent by a MIDI Output to a Windows-XP system (which drives the Drum machine).
Guideline for my project is this project:
For first startup i have limited the schematic to one piezo and a simpler code.
The Electronic schematic:
A piezo is connected to Analog Input 0.
When the piezo is hit, the velocity is read by piezoVal=AnalogRead(0) and then sent by
Serial.Write(0x90); // Midi-On command
Serial.Write(38); // Fixed Midi-Note
Serial.Write(piezoVal);
Delay(200);
Serial.Write(0x80); // Midi-On command
Serial.Write(38); // Fixed Midi-Note
Serial.Write(0);
The Midi-Out is connected as follows:
Middle Pin connected to ground
Pin 2 is connected to TX0
Pin 5 is connected to 220kOhm Resistor and then to 5V-Pin
What works:
If i hit the Piezo, the signal is correctly detected (and shown in the Serial Monitor).
Every time i hit the Piezo the RX LED lights up (shouldn't it be the TX LED??)
What doesn't work:
No Midi Signal is arriving at the Window's Midi In-Port.
What i have tested already:
Connected a Roland Drum Modul to the Windows Midi-IN
--> Success --> Means MIDI-In and MIDI cable correctly working
Changed MiDI-PCB-JACK
--> Still no Signal
Tried to use TX1 Port and changed sketch to
void setup() {
Serial1.begin(31250); // MIDI Baud rate
}
void loop() {
Serial1.write[...]
}
Is there any way to check if my Serial Port TX0 is working?
Any help is appreciated.
Best regards
Daniel