I wonder if I could ask you both once again for your help?
I want to send a midi note to a module to indicate audibly the tempo along with the LED. I have tried adding this but I'm afraid the coding won't compile correctly.
else if ((data == midi_clock) && (play_flag == 1)) {
if (clk / 2) digitalWrite(tempoled, LOW); //digitalWrite(tempoled, LOW); // percentage of lit time
MIDI.sendNoteOn(60, 127, 1);
else digitalWrite(tempoled, HIGH); //digitalWrite(tempoled, HIGH);
digitalWrite(tempoled, HIGH);
MIDI.sendNoteOn(60, 0, 1);
Serial.write(midi_clock); // send midi clock to out... Provides tempo!
clk++;
clk = clk % 24;
}
}
}
What do I need to alter in the code please?