Button Mapping Problem

R
Robert Blaszczyk posted Dec 8 '18, 13:52:

Hi,
my midi controller (AKAI LPK25) has no program change button, so i cant change presets.
I own a 2x16 lcd kit with integrated buttons ,although they dont work for this feature .
I dont know anything about electronics and python
pls help

R
Robert Blaszczyk posted Dec 8 '18, 13:55:

Edit : I own a Raspberry Pi B

A
Alex M posted Dec 10 '18, 05:28:

I'm guessing you have an LCD kit like this one Adafruit's RGB LCD Shield Kit w/ 16x2 Character Display.

So:

  1. Find out which 2 GPIO pins on your RPi your desired preset buttons on your LCD kit are connected to.
  2. Then, assuming you're using Joseph's original version of SamplerBox, you want to edit lines 374 and 375 of your samplerbox.py file.

For example using pins 20 and 21:

        GPIO.setup(20, GPIO.IN, pull_up_down=GPIO.PUD_UP)
        GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_UP)

Make sure you maintain line indentations - this is a distinct feature of python

R
Robert Blaszczyk posted Dec 10 '18, 22:07:

Thank you very much, it works!

M
mike m posted Dec 11 '18, 16:56:

i have a similar problem , i also own a RP B and if i wire it a button up , it doesnt change preset and i dont know which gpio pin i have to use. i cannot find samplebox.py on my sd card. i used the usp mirror

A
Alex M posted Dec 12 '18, 20:44:

Hey mike m,

Be default SamplerBox listens to pins 17 and 18. Make sure you're connected to those pins first and that you've wired your buttons correctly.

...

  (not published)
  I want to post as guest
 

Post