colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Sat Jun 30, 2018 3:48 pm

Hi Jurgen.

Thanks for your suggestions.
The screen is plugged on to the GPIO header and has a small HDMI connector for video, so I assume the video is through the HDMI and the touchscreen control is through the GPIO header.

If I manually replace the 'GPIO 25' entries for Vol+, Vol-, Random, Skip, Left, and Right in fruitbox.btn, fruitbox will start (no duplication error), but the touchscreen does not respond.

Interestingly, if I assign only one button to GPIO 25 in fruitbox.btn file, to avoid the duplication error, then reboot, that function will work when I touch the screen anywhere. It's like the touchscreen is working as one giant button.

Thanks again
Colin

shhammer5634
Posts: 57
Joined: Mon Dec 04, 2017 10:45 am
Location: Iowa, USA

Re: fruitbox MP3 jukebox

Sat Jun 30, 2018 5:09 pm

colinstahl wrote:
Sat Jun 30, 2018 3:48 pm
Hi Jurgen.

Thanks for your suggestions.
The screen is plugged on to the GPIO header and has a small HDMI connector for video, so I assume the video is through the HDMI and the touchscreen control is through the GPIO header.

If I manually replace the 'GPIO 25' entries for Vol+, Vol-, Random, Skip, Left, and Right in fruitbox.btn, fruitbox will start (no duplication error), but the touchscreen does not respond.

Interestingly, if I assign only one button to GPIO 25 in fruitbox.btn file, to avoid the duplication error, then reboot, that function will work when I touch the screen anywhere. It's like the touchscreen is working as one giant button.

Thanks again
Colin
Hi Colin,

Have you by any chance tried using evtest to see what your touch screen is doing? I was having trouble getting mine set up until I found out that mine had two different underlying ELO devices. Once I started using the right one, things worked. I was in the same boat. Mine worked with the PI desktop but not Fruitbox until I took the time to investigate further with evtest.

Hope you get it working soon.

Steve

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Sat Jun 30, 2018 10:16 pm

Hi Steve. I ran evtest, it only identified one device, as per log below;
the events in the log are from 2 screen touches, top left, then bottom right.

[email protected]:~/rpi-fruitbox-master $ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: ADS7846 Touchscreen
Select the device event number [0-0]: 0
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "ADS7846 Touchscreen"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 3484
Min 0
Max 4095
Event code 1 (ABS_Y)
Value 3357
Min 0
Max 4095
Event code 24 (ABS_PRESSURE)
Value 0
Min 0
Max 65535
Properties:
Testing ... (interrupt to exit)
Event: time 1530394793.358354, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1530394793.358354, type 3 (EV_ABS), code 0 (ABS_X), value 314
Event: time 1530394793.358354, type 3 (EV_ABS), code 1 (ABS_Y), value 375
Event: time 1530394793.358354, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65212
Event: time 1530394793.358354, -------------- SYN_REPORT ------------
Event: time 1530394793.378330, type 3 (EV_ABS), code 0 (ABS_X), value 302
Event: time 1530394793.378330, type 3 (EV_ABS), code 1 (ABS_Y), value 385
Event: time 1530394793.378330, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65220
Event: time 1530394793.378330, -------------- SYN_REPORT ------------
Event: time 1530394793.395412, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1530394793.395412, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1530394793.395412, -------------- SYN_REPORT ------------
Event: time 1530394813.928333, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1530394813.928333, type 3 (EV_ABS), code 0 (ABS_X), value 3554
Event: time 1530394813.928333, type 3 (EV_ABS), code 1 (ABS_Y), value 3813
Event: time 1530394813.928333, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65252
Event: time 1530394813.928333, -------------- SYN_REPORT ------------
Event: time 1530394813.948330, type 3 (EV_ABS), code 0 (ABS_X), value 3538
Event: time 1530394813.948330, type 3 (EV_ABS), code 1 (ABS_Y), value 3810
Event: time 1530394813.948330, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65266
Event: time 1530394813.948330, -------------- SYN_REPORT ------------
Event: time 1530394813.968321, type 3 (EV_ABS), code 0 (ABS_X), value 3535
Event: time 1530394813.968321, type 3 (EV_ABS), code 1 (ABS_Y), value 3665
Event: time 1530394813.968321, -------------- SYN_REPORT ------------
Event: time 1530394813.988335, type 3 (EV_ABS), code 0 (ABS_X), value 3518
Event: time 1530394813.988335, type 3 (EV_ABS), code 1 (ABS_Y), value 3776
Event: time 1530394813.988335, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65269
Event: time 1530394813.988335, -------------- SYN_REPORT ------------
Event: time 1530394814.008325, type 3 (EV_ABS), code 0 (ABS_X), value 3531
Event: time 1530394814.008325, type 3 (EV_ABS), code 1 (ABS_Y), value 3694
Event: time 1530394814.008325, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65254
Event: time 1530394814.008325, -------------- SYN_REPORT ------------
Event: time 1530394814.028319, type 3 (EV_ABS), code 0 (ABS_X), value 3558
Event: time 1530394814.028319, type 3 (EV_ABS), code 1 (ABS_Y), value 3649
Event: time 1530394814.028319, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65073
Event: time 1530394814.028319, -------------- SYN_REPORT ------------
Event: time 1530394814.045411, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1530394814.045411, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1530394814.045411, -------------- SYN_REPORT ------------

it's obviously doing something, not sure what though. lol.
Could it be a driver issue? I used the one on the CD that came with the touchscreen, but the instructions pointed me to a url with a driver that had a different filename....
Anyway, thanks!

shhammer5634
Posts: 57
Joined: Mon Dec 04, 2017 10:45 am
Location: Iowa, USA

Re: fruitbox MP3 jukebox

Sat Jun 30, 2018 10:44 pm

colinstahl wrote:
Sat Jun 30, 2018 10:16 pm
Hi Steve. I ran evtest, it only identified one device, as per log below;
the events in the log are from 2 screen touches, top left, then bottom right.

[email protected]:~/rpi-fruitbox-master $ sudo evtest
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: ADS7846 Touchscreen
Select the device event number [0-0]: 0
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "ADS7846 Touchscreen"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 3484
Min 0
Max 4095
Event code 1 (ABS_Y)
Value 3357
Min 0
Max 4095
Event code 24 (ABS_PRESSURE)
Value 0
Min 0
Max 65535
Properties:
Testing ... (interrupt to exit)
Event: time 1530394793.358354, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1530394793.358354, type 3 (EV_ABS), code 0 (ABS_X), value 314
Event: time 1530394793.358354, type 3 (EV_ABS), code 1 (ABS_Y), value 375
Event: time 1530394793.358354, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65212
Event: time 1530394793.358354, -------------- SYN_REPORT ------------
Event: time 1530394793.378330, type 3 (EV_ABS), code 0 (ABS_X), value 302
Event: time 1530394793.378330, type 3 (EV_ABS), code 1 (ABS_Y), value 385
Event: time 1530394793.378330, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65220
Event: time 1530394793.378330, -------------- SYN_REPORT ------------
Event: time 1530394793.395412, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1530394793.395412, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1530394793.395412, -------------- SYN_REPORT ------------
Event: time 1530394813.928333, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1530394813.928333, type 3 (EV_ABS), code 0 (ABS_X), value 3554
Event: time 1530394813.928333, type 3 (EV_ABS), code 1 (ABS_Y), value 3813
Event: time 1530394813.928333, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65252
Event: time 1530394813.928333, -------------- SYN_REPORT ------------
Event: time 1530394813.948330, type 3 (EV_ABS), code 0 (ABS_X), value 3538
Event: time 1530394813.948330, type 3 (EV_ABS), code 1 (ABS_Y), value 3810
Event: time 1530394813.948330, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65266
Event: time 1530394813.948330, -------------- SYN_REPORT ------------
Event: time 1530394813.968321, type 3 (EV_ABS), code 0 (ABS_X), value 3535
Event: time 1530394813.968321, type 3 (EV_ABS), code 1 (ABS_Y), value 3665
Event: time 1530394813.968321, -------------- SYN_REPORT ------------
Event: time 1530394813.988335, type 3 (EV_ABS), code 0 (ABS_X), value 3518
Event: time 1530394813.988335, type 3 (EV_ABS), code 1 (ABS_Y), value 3776
Event: time 1530394813.988335, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65269
Event: time 1530394813.988335, -------------- SYN_REPORT ------------
Event: time 1530394814.008325, type 3 (EV_ABS), code 0 (ABS_X), value 3531
Event: time 1530394814.008325, type 3 (EV_ABS), code 1 (ABS_Y), value 3694
Event: time 1530394814.008325, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65254
Event: time 1530394814.008325, -------------- SYN_REPORT ------------
Event: time 1530394814.028319, type 3 (EV_ABS), code 0 (ABS_X), value 3558
Event: time 1530394814.028319, type 3 (EV_ABS), code 1 (ABS_Y), value 3649
Event: time 1530394814.028319, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 65073
Event: time 1530394814.028319, -------------- SYN_REPORT ------------
Event: time 1530394814.045411, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1530394814.045411, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 0
Event: time 1530394814.045411, -------------- SYN_REPORT ------------

it's obviously doing something, not sure what though. lol.
Could it be a driver issue? I used the one on the CD that came with the touchscreen, but the instructions pointed me to a url with a driver that had a different filename....
Anyway, thanks!
Looks like it's passing the necessary information. Touch event, x and y coordinates. It was just a thought. You could try the other driver, but since it's working on the desktop that's probably not the issue.

One other question, are you running fruitbox using sudo? Sudo fruitbox ... ... I also had to do this to get my screen working...

Steve

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Sat Jun 30, 2018 11:17 pm

Hey Steve
Yes, I have this script in my .bashrc;
# autostart fruitbox
cd rpi-fruitbox-master
sudo ./fruitbox --cfg skins/TouchOne/fruitbox.cfg --touch-device ADS7846

shhammer5634
Posts: 57
Joined: Mon Dec 04, 2017 10:45 am
Location: Iowa, USA

Re: fruitbox MP3 jukebox

Sat Jun 30, 2018 11:19 pm

colinstahl wrote:
Sat Jun 30, 2018 11:17 pm
Hey Steve
Yes, I have this script in my .bashrc;
# autostart fruitbox
cd rpi-fruitbox-master
sudo ./fruitbox --cfg skins/TouchOne/fruitbox.cfg --touch-device ADS7846
Looks like you've covered the bases. Hopefully Mike and Jurgen can help you more than I can...

Steve

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Sun Jul 01, 2018 12:03 am

Steve
I greatly appreciate the help you've offered. You've given me some confidence already and hopefully it isn't just a dumb mistake on my part, or something that I've missed reading in the forum.
Thanks again
Colin

mamer999
Posts: 53
Joined: Fri Jan 26, 2018 7:56 am
Location: Germany

Re: fruitbox MP3 jukebox

Sun Jul 01, 2018 6:25 am

Hi Colin,

I think only Mike can help here. It may be due to the order of device polling. If an action of a GPIO pin is detected first, is Touch no longer checked for this action? Unfortunately, I only have displays that give touch signals via USB.

Greetings

Jürgen

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Sun Jul 01, 2018 4:44 pm

Hi Jurgen
Thanks for you input as well.

I took Steve's suggestion and manually replaced the 'GPIO 25' entries in the fruitbox.btn file with 'touch', and now when I run fruitbox I get this message;

[touch areas]
ButtonRandom = 423 421 94 53
ButtonSkip = 546 421 94 53
ButtonLeft = 663 421 48 53
ButtonRight = 724 421 45 53
ButtonVol- = 38 421 32 53
ButtonVol+ = 98 421 32 53

I assume these are min and max x,y coordinates for the button touch areas, but when I run evtest the smallest values I can generate in the top left corner of my screen are around 150,400, and the bottom right comes in about 3800,3800. That being said, It appeared to me that if fruitbox was running the touchscreen with these button coordinates they would be all up in the upper left corner of the screen, so I poked around with my stylus in that corner, and was able to find all of the functions by poking various areas in that corner. So, it appears the touchscreen is working, but the min/max values for the button areas need to be configured to work with my screen.

Seems like progress to me :)

I will read up on remapping the min/max button x,y coordinates in the user guide.

Thanks everyone,
I will report my success or failure.
Colin

User avatar
fruitbox
Posts: 304
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Sun Jul 01, 2018 8:16 pm

colinstahl wrote:
Sun Jul 01, 2018 4:44 pm
Hi Jurgen
Thanks for you input as well.

I took Steve's suggestion and manually replaced the 'GPIO 25' entries in the fruitbox.btn file with 'touch', and now when I run fruitbox I get this message;

[touch areas]
ButtonRandom = 423 421 94 53
ButtonSkip = 546 421 94 53
ButtonLeft = 663 421 48 53
ButtonRight = 724 421 45 53
ButtonVol- = 38 421 32 53
ButtonVol+ = 98 421 32 53

I assume these are min and max x,y coordinates for the button touch areas, but when I run evtest the smallest values I can generate in the top left corner of my screen are around 150,400, and the bottom right comes in about 3800,3800. That being said, It appeared to me that if fruitbox was running the touchscreen with these button coordinates they would be all up in the upper left corner of the screen, so I poked around with my stylus in that corner, and was able to find all of the functions by poking various areas in that corner. So, it appears the touchscreen is working, but the min/max values for the button areas need to be configured to work with my screen.

Seems like progress to me :)

I will read up on remapping the min/max button x,y coordinates in the user guide.

Thanks everyone,
I will report my success or failure.
Colin
Hi Colin,

The [touch areas] define the rectangular regions for the buttons (top left x, top left y, width, height).

It seems that the touchscreen you are using has a higher resolution touch co-ordinate system than the display resolution. This is one of the scenarios Jurgen and I debugged a while ago, and fruitbox should support this no problem. Under normal conditions, you need to use the --calibrate-touch command line option in conjunction with --config-buttons option, and fruitbox will write the correct values of TouchMin and TouchMax values in the fruitbox.btn file. However, in your case touch is being confused with GPIO 25 so this won't work. You can however bypass the touch calibration by putting the following two lines in the fruitbox.btn file to see if it helps...

Code: Select all

TouchMin = 0 0
TouchMax = 3800 3800
Regarding your initial problem (Touch registering as GPIO 25), maybe Jurgen was correct; fruitbox does indeed check for GPIO events before touch events so could be getting confused by your particular touchscreen. I can try swapping the detection around in the software and put a debug version of fruitbox on GitHub for you to try. Are you using Stretch or Jessie?

Cheers,
Mike

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Sun Jul 01, 2018 9:43 pm

Hi Mike.
Thanks for your reply.

I was thinking along those same lines, so I tried dividing the screen into 4 quadrants and assigning the following touch areas in fruitbox.cfg;

[touch areas]
ButtonRandom = 0 0 1900 1900
ButtonSkip = 1900 0 1900 1900
ButtonLeft = 0 1900 1900 1900
ButtonRight = 1900 1900 1900 1900
And I got the results I expected, any touch in the top left quadrant pressed the on-screen Random button, any touch on the top right pressed Skip, bottom left pressed Left, and bottom right pressed Right.

I restored my fruitbox.cfg file to its original format; which had these values before my experiment

[touch areas]
ButtonRandom = 423 421 94 53
ButtonSkip = 546 421 94 53
ButtonLeft = 663 421 48 53
ButtonRight = 724 421 45 53
ButtonVol- = 38 421 32 53
ButtonVol+ = 98 421 32 53

then added your suggestion to fruitbox.btn, so it appears as below;


TouchMin = 0 0
TouchMax = 3800 3800
ButtonVol+ = Touch
ButtonVol- = Touch
ButtonRandom = Touch
ButtonSelect = Touch
ButtonSkip = Touch
ButtonLeft = Touch
ButtonRight = Touch

The buttons are now close to where they should be and all seem to work in the vicinty of their functions. 3800 was just a guess though, so I'll experiment with those values.

I am running Stretch btw :)






Hi Colin,

The [touch areas] define the rectangular regions for the buttons (top left x, top left y, width, height).

It seems that the touchscreen you are using has a higher resolution touch co-ordinate system than the display resolution. This is one of the scenarios Jurgen and I debugged a while ago, and fruitbox should support this no problem. Under normal conditions, you need to use the --calibrate-touch command line option in conjunction with --config-buttons option, and fruitbox will write the correct values of TouchMin and TouchMax values in the fruitbox.btn file. However, in your case touch is being confused with GPIO 25 so this won't work. You can however bypass the touch calibration by putting the following two lines in the fruitbox.btn file to see if it helps...
Code: Select all

TouchMin = 0 0
TouchMax = 3800 3800
Regarding your initial problem (Touch registering as GPIO 25), maybe Jurgen was correct; fruitbox does indeed check for GPIO events before touch events so could be getting confused by your particular touchscreen. I can try swapping the detection around in the software and put a debug version of fruitbox on GitHub for you to try. Are you using Stretch or Jessie?

Cheers,
Mike

User avatar
fruitbox
Posts: 304
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Tue Jul 03, 2018 11:12 am

Hi Colin,

I've put a debug version of fruitbox on Github for you to try...

Code: Select all

wget https://github.com/chundermike/rpi-fruitbox/raw/master/fruitbox-1.12-debug-colin-1
sudo chmod +x ./fruitbox-1.12-debug-colin-1
Run this with the--config-buttons and --calibrate-touch command line options and let me know if you still get the GPIO 25 issue...

Code: Select all

sudo ./fruitbox-1.12-debug-colin-1 --config-buttons --calibrate-touch

Cheers,
Mike

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Tue Jul 03, 2018 7:59 pm

Hey Mike.
Thank you for looking into this.
I created a new install to test the debug version, following the directions you provided.
I still get '* GPIO 25 *' messages when I touch the screen when running
sudo ./fruitbox-1.12-debug-colin-1 --config-buttons --calibrate-touch.

Thanks
Colin

fruitbox wrote: Hi Colin,

I've put a debug version of fruitbox on Github for you to try...

Code: Select all

wget https://github.com/chundermike/rpi-fruitbox/raw/master/fruitbox-1.12-debug-colin-1
sudo chmod +x ./fruitbox-1.12-debug-colin-1
Run this with the--config-buttons and --calibrate-touch command line options and let me know if you still get the GPIO 25 issue...

Code: Select all

sudo ./fruitbox-1.12-debug-colin-1 --config-buttons --calibrate-touch

Cheers,
Mike

mamer999
Posts: 53
Joined: Fri Jan 26, 2018 7:56 am
Location: Germany

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 8:57 am

Hi Colin,
just an idea. What happens if you build fruitbox.btn completely manually?

Code: Select all

# fruitbox.btn button mapping file
# Missing buttons will assume their default values ​​(see user guide)
TouchDevice = ADS7846
TouchMin = [min x] [min y]
TouchMax = [max x] [max y]

ButtonVol + = Touch
ButtonVol- = Touch
ButtonRandom = Touch
ButtonSkip = touch
ButtonLeft = Touch
ButtonRight = Touch
You can determine min x, min y and max x, max y via evtest (touch upper left and lower right).
Then start fruitbox directly with --cfg skinfile.

Cheers
Jürgen

xave2000
Posts: 2
Joined: Wed Jul 04, 2018 12:45 pm

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 12:51 pm

Hello
thanks for this beautifull good job

i have a question:

can you tell me the command line for auto execute at starting fruitbox?
thanks

User avatar
fruitbox
Posts: 304
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 1:04 pm

mamer999 wrote:
Wed Jul 04, 2018 8:57 am
You can determine min x, min y and max x, max y via evtest (touch upper left and lower right).
Then start fruitbox directly with --cfg skinfile.
evtest also indicates min and max values through its report (looking at a previous post it appears to be min 0,0; max 4095, 4095).

Mike

mamer999
Posts: 53
Joined: Fri Jan 26, 2018 7:56 am
Location: Germany

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 1:31 pm

fruitbox wrote:
Wed Jul 04, 2018 1:04 pm
mamer999 wrote:
Wed Jul 04, 2018 8:57 am
You can determine min x, min y and max x, max y via evtest (touch upper left and lower right).
Then start fruitbox directly with --cfg skinfile.
evtest also indicates min and max values through its report (looking at a previous post it appears to be min 0,0; max 4095, 4095).

Mike
Hi Mike,

just so we do not misunderstand. Min / Max 0 - 4095 are the limits of touch resolution. But I think, fruitbox needs the values ​​that are reported at a touch in the corners, so that this can be synchronized with the physical resolution of the display? On my display with deviating touch resolution in fruitbox.btn is min always greater 0 (500 for example) and max always much smaller than e.g. 4095.

Cheers
Jürgen

User avatar
fruitbox
Posts: 304
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 1:32 pm

xave2000 wrote:
Wed Jul 04, 2018 12:51 pm
Hello
thanks for this beautifull good job

i have a question:

can you tell me the command line for auto execute at starting fruitbox?
thanks
Hi,

It's mentioned at the end of the user guide...

Code: Select all

 Automatically run fruitbox on power up
  --------------------------------------
  
  To run fruitbox automatically on power up, add the following 
  lines to ~/.bashrc :
  
   cd <directory where fruitbox is installed>
   sudo ./fruitbox --cfg <your cfg file>
   
Cheers,
Mike

colinstahl
Posts: 13
Joined: Thu Jun 28, 2018 2:18 pm
Location: Canada

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 1:34 pm

fruitbox wrote:
mamer999 wrote:
Wed Jul 04, 2018 8:57 am
You can determine min x, min y and max x, max y via evtest (touch upper left and lower right).
Then start fruitbox directly with --cfg skinfile.
evtest also indicates min and max values through its report (looking at a previous post it appears to be min 0,0; max 4095, 4095).

Mike
Hi Mike, Jurgen.
I 'm running with your suggestions, with a manually created fruitbox.btn specifying TouchMin at 0 0 and TouchMax at 3950 4100. I experimented with different values for TouchMax and these values seemed to correspond with the button placement about the best. All buttons are now working, and I'm ready to install my Pi with this amazing program into my juke. Thank you so much you two, as well as Steve, for your hard work on this project and for your assistance and kindness to me.
Colin

mamer999
Posts: 53
Joined: Fri Jan 26, 2018 7:56 am
Location: Germany

Re: fruitbox MP3 jukebox

Wed Jul 04, 2018 5:39 pm

mamer999 wrote:
Wed Jul 04, 2018 1:31 pm
fruitbox wrote:
Wed Jul 04, 2018 1:04 pm
mamer999 wrote:
Wed Jul 04, 2018 8:57 am
You can determine min x, min y and max x, max y via evtest (touch upper left and lower right).
Then start fruitbox directly with --cfg skinfile.
evtest also indicates min and max values through its report (looking at a previous post it appears to be min 0,0; max 4095, 4095).

Mike
Hi Mike,

just so we do not misunderstand. Min / Max 0 - 4095 are the limits of touch resolution. But I think, fruitbox needs the values ​​that are reported at a touch in the corners, so that this can be synchronized with the physical resolution of the display? On my display with deviating touch resolution in fruitbox.btn is min always greater 0 (500 for example) and max always much smaller than e.g. 4095.

Cheers
Jürgen
ok, just so nobody gets confused:
In my last post, I exaggerated a bit as far as the offset was concerned.
My current display has a resolution of 1280 x 800.
Touch resolution is 0 0, 2047 2047.

In fruitbox.btn after calibration with --calibrate-touch:

TouchDevice = eGalax
TouchMin = 45 113
TouchMax = 1950 1909

Cheers
Jürgen

joggyBnoob
Posts: 6
Joined: Sun Feb 11, 2018 10:30 am

Re: fruitbox MP3 jukebox

Thu Jul 05, 2018 8:35 am

Hello Mike,

Is it possible to create a button who can delete the file fruitbox.db ?

The idea would be to run Fruitbox and the action of one button 'DeleteDB' will delete the file before power off.

this is usefull pour those who use a USB memory stick and want modify their MP3 list.

Cheers.


JoggyBnoob.

User avatar
fruitbox
Posts: 304
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Fri Jul 06, 2018 2:52 pm

joggyBnoob wrote:
Thu Jul 05, 2018 8:35 am
Hello Mike,

Is it possible to create a button who can delete the file fruitbox.db ?

The idea would be to run Fruitbox and the action of one button 'DeleteDB' will delete the file before power off.

this is usefull pour those who use a USB memory stick and want modify their MP3 list.

Cheers.


JoggyBnoob.
Hi,

Not directly, but you could use one of the new FLAG buttons, to write a mesage to a file (using a [status] Output). Then you'll need an external script which reads the said file for the message and then deletes the database file.

Cheers,
Mike

PittStone
Posts: 12
Joined: Mon Apr 23, 2018 6:48 pm

Re: fruitbox MP3 jukebox

Sun Jul 08, 2018 6:26 pm

@JoggyBnoob

I have made a USB.cfg with:

Database = /media/usb0/fruitbox.db
MusicPath = /media/usb0/mp3/

If you put new Music on your USB Stick, you can delete the fruitbox.db on your USB Stick and Fruitbox make a new fruitbox.db on your USB Stick.

But you need this steps for Strech:

USB Mounting:
1. Install the package:
sudo apt-get install usbmount

2. Make sure it works in Stretch by changing "MountFlags=slave" to "MountFlags=shared here":
sudo nano /lib/systemd/system/systemd-udevd.service

3. Reboot and it works!
sudo shutdown -r now

joggyBnoob wrote:
Thu Jul 05, 2018 8:35 am
Hello Mike,

Is it possible to create a button who can delete the file fruitbox.db ?

The idea would be to run Fruitbox and the action of one button 'DeleteDB' will delete the file before power off.

this is usefull pour those who use a USB memory stick and want modify their MP3 list.

Cheers.


JoggyBnoob.

joggyBnoob
Posts: 6
Joined: Sun Feb 11, 2018 10:30 am

Re: fruitbox MP3 jukebox

Mon Jul 09, 2018 6:14 am

Thanks

mamer999
Posts: 53
Joined: Fri Jan 26, 2018 7:56 am
Location: Germany

Re: fruitbox MP3 jukebox

Tue Jul 10, 2018 9:34 am

Hi Mike,
I'm back again. For a new project, I got a display that uses the driver of Colin's Display (ADS7846, touch via GPIO). --config-buttons does not work with fruitbox 1.12 for me to.

Without --calibrate-touch * GPIO 25 * will be reported on every touch. With --calibrate-touch the Pi hangs up and has to be restarted (fruitbox and fruitbox-1.12-debug-colin-1).

When I use fruitbox-1.11-debug-buttons-1 with calibrate-touch, calibration does not start. Each touch brings back "* GPIO 25 *". fruitbox.dbg then contains "5bb447a85 GPIO EVENT EMIT" for each touch.

If i can help again let me know.

With manually created fruitbox.btn all works well!

Cheers

Jürgen

Return to “Graphics, sound and multimedia”