Hello guys, totally new to Arduino, and i am trying to build a midi footswitch controller for my boss gt1000 MFX pedal. The thing is, i assembled the circuit, uploaded the code with no errors (using arduino UNO, but also tried arduino nano with same results), but midiox doesn´t detect any midi signal, neither some online monitor, nor my presonus audio/midi interface through my DAW (ableton live). I would be grateful for any help. Leaving some photos and the code below.
#include <MIDI.h>
#include <midi_Defs.h>
#include <midi_Message.h>
#include <midi_Namespace.h>
#include <midi_Settings.h>
const int buttonOne = 6; // assign button pin to variable
const int buttonTwo = 7; // assign button pin to variable
MIDI_CREATE_INSTANCE(HardwareSerial,Serial, midiOut); // create a MIDI object called midiOut
void setup() {
pinMode(buttonOne,INPUT); // setup button as input
pinMode(buttonTwo,INPUT); // setup button as input
Serial.begin(31250); // setup MIDI output
}
void loop() {
if(digitalRead(buttonOne) == HIGH) { // check button state
delay(10); // software de-bounce
if(digitalRead(buttonOne) == HIGH) { // check button state again
midiOut.sendControlChange(56,127,1); // send a MIDI CC -- 56 = note, 127 = velocity, 1 = channel
delay(250);
}
}
if(digitalRead(buttonTwo) == HIGH) { // check button state
delay(10); // software de-bounce
if(digitalRead(buttonTwo) == HIGH) { // check button state again
midiOut.sendControlChange(42,127,1); // send a MIDI CC -- 42 = note, 127 = velocity, 1 = channel
delay(250);
}
}
}
I don't think MidiOX can read from a serial device (com port ). It needs a midi device. Your UNO cannot act as a midi device for your PC - its is always recognized as a serial com device. You need another arduino with native USB support - e.g. a Leonardo - that can act as USB midi device. Or you need a software on the PC that converts a serial to a midi device. Something like Hairless Midi.
Hello friend, i have the arduino uno conected to usb only as power supply. The midi output in the protoboard is connected to a presonus audio interface that has midi in and out ports. Even though the interface is receiving midi messages from other devices (tested it and they appear in midiox), the arduino doesn´t seems to have any midi comunication, despite the rx led enlightens every time i press one of the two buttons.
It looks like the MIDI out on your bread board is not wired up right.
The lower connection looks like it is one hole too high, to me. But the photo is from a poor angle to see it correctly. That is the problem with photographs as against diagrams.
Sorry, I missed the DIN connector at the bottom of the breadboard. But if you use 'Serial' it's always transmitted to USB too . So you use USB and the DIN connector in parallel.
Are the resistors you use really 220 ohm ( what they should be ) ? It looks like red-red-black which would be only 22 ohms.
As @Grumpy_Mike pointed out, a schematic would be much better than the pictures.
Yes it looks like that to me as well. Can you measure it with a digital meter. They are only a few pounds from many thrift shops.
As to your diagram then it is not clear which way it is facing, that is if you are looking at the back or the front of the socket. If it is the wrong way round that would also stop it from working.