Arduino MIDI Input

Aus Technik-fan.de Wiki
Zur Navigation springen Zur Suche springen

Experimente mit dem Arduino Mega und Midi Input.

Bauteile:

Diode: 1N 4148
Optokoppler: CNY 17F2
Widerstand: 220 Ohm, 2,2 kOhm
Lochrasterplatine: H25PR050
Din Buchse Halbrund

Arduino Sketch:

int incomingByte = 0;	// for incoming serial data

void setup() {
  Serial.begin(57600);
  Serial3.begin(57600);
}

void loop() {
  
  incomingByte = Serial3.read();
  if (incomingByte != -1 and incomingByte != 248 and incomingByte != 254) { // Filtering
  Serial.println(incomingByte); }
}


Platine von vorne


Platine von hinten


Belegung des DIN Steckers - MIDI Input