roberthofman / piloopdrumbox

Raspberry pi + drum pad + loop station
24 stars 3 forks source link

NeoTrellis Pad not recognized? #8

Closed theghostronaut closed 2 months ago

theghostronaut commented 3 years ago

First, thank you for providing your code and the cad files. I'm in the process of setting this up on a Raspberry Pi Zero WH.

I'm using the same hardware as you, only the Pad is different as I couldn't get a hold of the one you are using (I'm using Adafruit NeoTrellis RGB: https://www.berrybase.de/neu/adafruit-neotrellis-rgb-treiber-pcb-f-252-r-4x4-keypad?c=2434). It comes diodes/LEDs already installed.

I'm having some trouble getting you script to work and it would be great if you could offer some help.

I'm pretty sure I've installed all the necessary modules and libraries. My LCD is working and my 4x4 pad input is properly recognised when testing with a test script from the NeoTrellis install instructions.

When I run main.py via python3, the output looks like this:

/home/pi/piloopdrumbox/resources/Button_pad.py:73: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(self.btnRowPins[row], GPIO.IN, pull_up_down=GPIO.PUD_UP)
/home/pi/piloopdrumbox/resources/Button_pad.py:78: RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
  GPIO.setup(self.colorPins[row][color], GPIO.OUT, initial=GPIO.LOW)
priority 6 scheduling failed; running at normal priority
priority 8 scheduling failed.
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
watchdog: signaling pd...
connecting to port 4000
watchdog: signaling pd...

It continues indefinitely with the "watchog: signaling pd..." statement.

Button presses do not seem to be recognised at all, nor are the two bottom rows lit as shown in your video. I'm assuming the code is written in a specific way to only work with the model of Pad you are using and mine is not recognised properly. Is there a way to get this to work with my pad? Otherwise I guess I will have to find the one you are using.

Could you offer some help?

I've attached a file of my wiring.

Thank you wiring_piloopbox !

roberthofman commented 3 years ago

Hi! Seems like the python-puredata connection is not working as expected (the priority errors). Did you follow all the steps in the readme regarding the setup of the sound card? And could you check if puredata is able to play sound out of the soundcard?

I recall seeing the priority error, so either the steps on the readme or some Googling should help.

I'll have another look in the weekend. Robert

theghostronaut commented 3 years ago

Thank you for your fast response. I will check again if I set up the soundcard correctly. Other than that, should the NeoTrellis Pad work out of the box with your code, you think? I feel like the issue might be there...

roberthofman commented 3 years ago

I don't think so, I'm using row/column scanning ranges using 8 pins. You're using a digital keypad with SDA/SCL so you have to adjust the code for that. The pin setup for my keypad is in resources/button_pad.py self.btnColumnPins = [31, 33, 35, 37] # Pin numbers for columns (SWT_GND) self.btnRowPins = [13, 15, 19, 21] # Pin numbers for rows (SWITCH) self.ledColumnPins = [32, 36, 38, 40] # Pin numbers for the LED ground (LED_GND)