Using the MIDI Library to talk to a guitar pedal.

So I'm running into some trouble trying to get my Arduino to talk to my Lin6 M9 pedal.

I'm using the MIDI library, and I'm trying to turn the pedals looper on/off via the arduino.

I've hooked up the Arduino to a MIDI cable using this:

And hooked that directly to the MIDI in on the Line6 pedal.

I didn't have any 220ohm resistors, so I used 2 in parallel and have a 270ohm resistor between 5V and pin4 of the MIDI cable. Not sure if this is critical here.

Next I'm using the MIDI library to try to send messages to the Line6 pedal.

Here is my simple test code (I've got a whole wad of button based code going, but nothing was working, so I wanted to try a simple on/off code).

#include <MIDI.h>
#define LED 13

void setup() {
  pinMode(LED, OUTPUT);

void loop() {
  digitalWrite(LED, HIGH);
  digitalWrite(LED, LOW);

According to the M9 manual here:

(appendix A1).
The pedal wants a CC#50 with a value of 64-127 to turn record on, and a CC#28, with a value of 64-127, to turn the play mode on.
It doesn't specify what channel, so I'm sending it on channel 1.

I'm getting nothing at all happening.
I don't know if the 220 v 270 resistor is a problem. Or if there's something wrong with how I'm sending the code.
I tried using
MIDI.sendControlChange (50,127,1);
instead of MIDI.send but neither worked.

Any ideas as to why this isn't working?

I haven't experimented with the MIDI library, but I do know enough about MIDI itself to know that the channel that the message is being sent to is vital; if the channel that the pedal is set to receive on does not match the channel that the external device is set to transmit on, the effect of the transmission won't be heard.

I have checked out the docs on the MIDI library and there should be a method used to set the channel.

Check your guitar pedal's documentation to see what channel it is set to receive on and set the MIDI object to that same channel and see what results yield.

The manual doesn't specify what MIDI channel it's expecting (the Line6 pedal).

The MIDI.send command won't work without something in the channel spot. I've tried different things too. 0, 1, 16, even OMNI. Nothing.

I've also tried numbers in the MIDI.begin(). I put a 1 in there, a 0. Again, nothing.

I'm wondering if the CC message it's expecting is more than just CC#,value,channel. Like Note messages have note ON and OFFs. There's no CC "OFF" message, but it seems naked just sending a solitary "127" out there.

I'm going to try again using Serial instead of MIDI.

So Serial.begin(31250)

and then: