Thank you I will try the code, I tried to use a couple of libraries to help me make it easier. Like shifty. But it just lit up every LED up, with shifty it allows you to write digital inputs like you would for like a LED or button.
So this is the code I'm running for the mode button. I'm probably best practicing on the mode button since it puts it in play mode and record mode. Once any other button is pressed, I will looose track of the pedals state because it will either stay lit red or green till that pedal is pressed again because I need to figure out how to write it like as if it uses triggers with midi notes. Not hundred percent what I'm on about or how I'll go about it if I manage it.
Would thi be the correct way of writing it to a push button? If the common cathode LED, red was connected to 1 and green connected to 2?
if (digitalRead(modebtn) == HIGH && toggle8 == 1){
toggle8 = 0;
if(mode == 0){
mode = 1;
midi.write(0x90);
midi.write(0x17);
midi.write((byte)0x00);
leds = 0;
updateShiftRegister();
delay(300);
bitSet(leds, 1);
updateShiftRegister();
delay(300);
}
else if(mode == 1){
mode = 0;
midi.write(0x90);
midi.write(0x30);
midi.write((byte)0x00);
void loop()
{
leds = 0;
updateShiftRegister();
delay(300);
bitSet(leds, 2);
updateShiftRegister();
delay(300);
}
Do I have to wire the blue leg? Because I don't need it? Thanks