HomSpace Forum

Full Version: Buttons for folder selections
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Ari

Hey Everyone,

First of all, I am NOT a programmer! Sorry for that. This will make the following maybe a little bit more difficult Confused

What I wanted:
I wanted a sampler box to play sounds (not instrumental sounds, more like funny sounds) for radio show or podcast.

What I did:
I found the original samplerbox page. I bought every item which was on the list. But found out that it was made for Raspberry Pi 2. And I had a RP3B+. So I got to this page here.
Now I installed everything like it was on the samplerbox.org page. Just with RP3B+ instead of RP2. I Installed the Software from Hans. Recorded some of the desired sounds and putted them onto a external USB drive.

What I got:
After powering on the system, a few seconds later I can play the sounds I wanted by pushing the buttons. Perfect! Great! It works! Big Grin  (Ok ok... Not at beginning... I figured out that I had to name the sounds as the buttons. Like 36, 37, 38 ..... 51. Because that worked for me. The "name-code-stuff" was complicated for my brain and even if I think I did it right, it did`t worked for me. But anyway, I can live with the "numbers as names part" Rolleyes )

What I am missing:
The mentioned buttons from samperbox.org (which I installed exactly this way) are not working. Display shows "0000" and buttons pressing is doing nothing.
I checked the configuration files, and I think I found a part where I think (I have to say "think" a lot, because again... I am not a programmer Sad  Sorry! ) its mentioned that Hans choosed some different GPIOs for these buttons. So I put the buttons on the mentioned GPIOs and not on these from samplerbox.org.... But doesn't work for me either.

What I want now:
Can anyone help me out with this? Explaining slowly and easy, so that even I understand.
If your solution helps me out, send me your paypal address (if you want) and I will send some €, to say "thank you".  Wink 

Best regards,
Ari
Hi Ari,
OK, I'll give it a shot.

Starting with the buttons:
For wiring, first way is to wire like the original. This way we prevent confusion regarding the pin numbering.
Hans changed the numbering to ease support for other displays then the original one (that you have), so we can safely revert to the original two button setup.
So you wire it as on the .org instructions
For this, insert the SD in your PC and change the samplerbox/configuration.txt on the first (or only) partition of the inserted card. New text below, you'll find the original around approx at line 80-90 .
Code:
#     -- USE_BUTTONS --        ; A valid GPIO value will activate the button
BUT_incr=17                     ; Increase button, increases value/proceeds to next menu choice
BUT_decr=18                     ; Decrease button, opposite of above. In 3-button setup it will return from submenu
#BUT_sel=26                      ; Select button, either selects menu choice or returns to menu from value set
#BUT_ret=xx                      ; if this button is available, it returns to menu and the decr-button is consistent
Second way:
If you wired like Hans = according the picture on this (homspace) site, you only have to put the dash (=#) on the but_sel and but_ret lines similar to above.

Either way the buttons will do their job ... if activated, which is not default.
They can be activated in this same configuration.txt, so change
USE_BUTTONS = False
to
USE_BUTTONS = True

Now your display still  doesn't work as it is also not activated by default.
Similar to the the buttons, change:
USE_I2C_LCD = False
to
USE_I2C_LCD = True

Hope this helps

Ari

Hi Noek,

thanks for the help.
I tried it in the first way. I wired everything as seen on samplerbox.org. And I adjust the code as you mentioned and set the values on "True".
When I start, the sounds from Folder "0" are loading. I can play them. The display is off. Its starts much later (I guess thats normal?!).

When I press "+" or "-" nothing happens. It is still red and showing "0000".

I did not tried it in the second way. Because I wasn't able to find the wiring diagram on github. Maybe you can share a link.


I checked with a multimeter. The idea came up in my head that the wiring is worng, because... to be honest... the wireing diagram on samplerbox.org is done wiht "Windows paint".
But everything seems to work. The Display has voltage. (obviously...). The buttons are having unpressed "infinity resistance" and when pressed "no resistance". I compared again with the GPIO sheet from RP3B+ so that I am 100% sure that I connected to the right GPIO Pins (17 and 18, as mentioned) are the 6th Pins, counted from the top down.
So no mistake here. I mean I can "solder" it again. But I measured the resistance from Button to GPIO and its going thorugh. So no idea.

So I try to do it again with your second way. When I found the picture. Or any other ideas?

Best regards,
Ari
Hi Ari,
Hans has a diagram on the build page pins upside down, pin coding normal orientation on the same page (but it seems you have that as indeed pins are on 6th position).
However: you should see more on the LCD. While loading it should display "L000" very quickly.
So perhaps set changes OK without being visible because issue is in the LCD ?
Are you able to connect the webgui, because that is more communicative than buttons and 7-segment.

Ari

Hi noek,

I will try it this week to get into the Web gui. And I test also the Display issues.
Thank you. I will keep you informed. Then we see if it will work or how we could proceed further.

Best regards,
Ari
(10-03-21, 14:02)Ari Wrote: [ -> ]Hi noek,

I will try it this week to get into the Web gui. And I test also the Display issues.
Thank you. I will keep you informed. Then we see if it will work or how we could proceed further.

Best regards,
Ari
Hi Ari, 

How many buttons did you try using? 
There seems to be a bug in the use of one/two buttons in the last beta image (we are testing it now) and it might probably be affecting the last stable version as well, which I assume you are using. Can you please confirm the version you are using (name of the image) and number of buttons you are trying to use please?
I can check with same settings to see if I get the same behaviour. 
Best, 
Marc
Hi guys,
I confirm one and two button setups cause the menu system to crash since 20200810 release.
It will be fixed during the beta Marc mentions.
Just hold on a couple of weeks, the new image/release will have this fix included.
Regards, Hans