garubi
Well-known member
I'm trying to make a working Midi DIN output but after several hours checking, debugging etc... I can't get it sending anyting...
so I'm asking your help to understand where I'm failing...
I'm using a Teensy LC. Arduino 1.8.2. Teensyduino 1.36
the test sketch I'm using is this:
If I push the button, the Led lights, when I release it the Led turns off, as expected.
If I use usbMidi I get Note On and Note Off accordingly to the buttun press and release.
If I try with MIDI library nothing is (apparently) sent.
I tried using Usb Type Serial, Midi, Serial+MIDI but nothing changed.
Here are some pictures of the circuit on the breadbord.
The resistors are 47 Ohm.
I'm sure that's something very obvious that's wrong... but I can't see it... can you help me?
Thanks in advance!
Stefano
so I'm asking your help to understand where I'm failing...
I'm using a Teensy LC. Arduino 1.8.2. Teensyduino 1.36
the test sketch I'm using is this:
Code:
#include <MIDI.h>
#include <Bounce.h> // Bounce library makes button change detection easy
#define LED 13 // LED pin on Arduino board
Bounce button1 = Bounce(12, 5); // 5 = 5 ms debounce time
void setup() {
pinMode(12, INPUT_PULLUP);
pinMode(LED, OUTPUT);
MIDI.begin(MIDI_CHANNEL_OMNI);
}
void loop() {
button1.update();
// Note On messages when each button is pressed
if (button1.fallingEdge()) {
// usbMIDI.sendNoteOn(60, 99, 1); // 60 = C4
MIDI.sendNoteOn(60, 99, 1);
digitalWrite(LED,HIGH); // Blink the LED
}
// Note Off messages when each button is released
if (button1.risingEdge()) {
// usbMIDI.sendNoteOff(60, 0, 1); // 60 = C4
MIDI.sendNoteOff(60, 0, 1);
digitalWrite(LED,LOW); // Blink the LED
}
}
If I push the button, the Led lights, when I release it the Led turns off, as expected.
If I use usbMidi I get Note On and Note Off accordingly to the buttun press and release.
If I try with MIDI library nothing is (apparently) sent.
I tried using Usb Type Serial, Midi, Serial+MIDI but nothing changed.
Here are some pictures of the circuit on the breadbord.
The resistors are 47 Ohm.
I'm sure that's something very obvious that's wrong... but I can't see it... can you help me?
Thanks in advance!
Stefano