Status LEDs on Launchpad Mini and Mini mk2

Adapting SteveC’s full-sized Launchpad MK2 example which uses 2 32 bit variables to store the status of the 64 square button LEDs mostly involved correcting for the different MIDI note numbers. I have it working, but I’m seeing negative values in the array variables when buttons D8 or H8 are pressed, which doesn’t seem right. I don’t really understand how the bit-shifting magic part happens. I’m feeding it row and column numbers from 0-7.

Launchpad-64-Square-Buttons-Toggle-2020-12-16.bmtp (4.7 KB)

Ah, nope, SteveC says that’s OK. So here’s a working bit of code.

Good Job!

Hopefully others can find it useful too.

1 Like