Programmed some buttons to send CC value 127 when pressed, otherwise zero. It works as intended when connected and shows 0 - 127 to disp/chart (shown below), but it doesn't send the trig along with it. logic/change doesn't do it either. I've also left the portion of code which sends the MIDI value from my microcontroller, if relevant. Thanks!
for (int v = 0; v < 7; v++) {
lastButtonPress[v] = buttonPress[v];
buttonPress[v] = digitalRead(buttonNames[v]);
if (buttonPress[v] != lastButtonPress[v]) {
if (buttonPress[v] == LOW) {
MIDI.sendControlChange(v + 42, 127, MIDISendChannel);
delay(5);
}else{
MIDI.sendControlChange(v + 42, 0, MIDISendChannel);
}
}
}
edit: It's in a loop because I'm sending from 7 buttons. All of the buttons send the values properly to their respective CC number.