Author Topic: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top  (Read 732 times)

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,420
  • Kudos: 45
This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« on: January 10, 2019, 12:24:18 PM »

This just popped up on the FPP Facebook Group.   For $16 it could be worth playing with.   It says it has a Raspian Driver so I'm not sure how that all plays in with the current FPP images.  Would be cool if we could get it to do something with FPP

https://liliputing.com/2019/01/this-16-raspberry-pi-case-has-a-3-5-inch-touchscreen-on-top.html?fbclid=IwAR1S5duQ-3D3x30jNxpXI73IQJuIqwBRHe1IEmXq6UjO6-OJgafHnxf3TOs



-Mark

Offline jmb

  • Newbie
  • *
  • Join Date: Sep 2018
  • Location:
  • Posts: 7
  • Kudos: 0
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #1 on: January 10, 2019, 12:33:01 PM »
I just saw that in my daily spam from banggood. I don't see much immediate benefit for it. I am going to get one and make it work with one of the Pis at home, even though none of them are running the Raspian image. The driver is here -> http://www.lcdwiki.com/RaspberryPi-LCD-Driver. It can't be that hard to add it to a non-Raspian image like the one used for FPP.

Offline stanward

  • Jr. Member
  • **
  • Join Date: May 2015
  • Location:
  • Posts: 83
  • Kudos: 0
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #2 on: January 10, 2019, 12:47:26 PM »
Would be nice if the status of the FPP would be displayed on the Pi display itself.  I leave my FPP master on my office desk and have it connected to a small 7 display.  I only get to see the FPP Login then I know if it is done rebooting,etc.  no real use tho.


Sent from my iPhone using Tapatalk

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #3 on: January 10, 2019, 01:45:54 PM »
I just saw that in my daily spam from banggood. I don't see much immediate benefit for it. I am going to get one and make it work with one of the Pis at home, even though none of them are running the Raspian image. The driver is here -> http://www.lcdwiki.com/RaspberryPi-LCD-Driver. It can't be that hard to add it to a non-Raspian image like the one used for FPP.

FPP uses Raspbian for our Pi images.

Using this as a small matrix would be fairly easy since it uses the SPI interface.  Getting it to display other useful FPP information would probably take a bit more work since we only have a web interface currently.
-
Chris

Offline jmb

  • Newbie
  • *
  • Join Date: Sep 2018
  • Location:
  • Posts: 7
  • Kudos: 0
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #4 on: January 10, 2019, 01:55:19 PM »
I will still get one but I can't think of an immediate use for it. Everything I imagine a typical user would want to know about FPP's status is already available via the web interface or MQTT.

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,420
  • Kudos: 45
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #5 on: January 10, 2019, 02:26:43 PM »
Using this as a small matrix would be fairly easy since it uses the SPI interface.  Getting it to display other useful FPP information would probably take a bit more work since we only have a web interface currently.
A small matrix could be fun.  We would have to sequence it with xLights but thats pretty easy.   Maybe use this method to display Current Song/Artist/Playlist, etc.

What does the Pi 2x16 LCD option do?  I would think this would at least do the same if not more?

Offline dkulp

  • Moderator
  • *****
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,583
  • Kudos: 92
    • KulpLights.com
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #6 on: January 10, 2019, 02:36:28 PM »



There is some code someplace to create a virtual display based on x/y coordinates of pixels generated from an xLights preview.   I think it would be kind of funny to have a "mini-preview" of the display on the panel that displays what's happening "live". 




Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #7 on: January 10, 2019, 02:46:10 PM »
A small matrix could be fun.  We would have to sequence it with xLights but thats pretty easy.   Maybe use this method to display Current Song/Artist/Playlist, etc.

What does the Pi 2x16 LCD option do?  I would think this would at least do the same if not more?

I'm not sure if the Pi 2x16 even works anymore, I don't know of anyone still using that and I never even had one to test with.

A couple years ago I added a Channel Output for another 480x320 LCD that stacked directly onto the Pi, but then when I went to give others the link, they weren't for sale anymore.  I think the newer ones use the SPI interface and mine was an older model.     Here's a demo video I did:  https://vimeo.com/216083402   The refresh rate on that one was pretty bad as well,  you can see the refresh lines in the demo video.  It definitely wasn't meant for our 20fps sequences. :)  480x320x3 is 460800 channels times 20fps times 8 bits means we would have to run the SPI output at about 75Mhz to play a 20fps/50ms sequence. 

There is some code someplace to create a virtual display based on x/y coordinates of pixels generated from an xLights preview.   I think it would be kind of funny to have a "mini-preview" of the display on the panel that displays what's happening "live". 

The Virtual Display Channel Output code is in master and v2.6 and works on both the Pi HDMI output and in an X11 window if you have that code compiled in FPP.  We just need the patch added to xLights to generate the CSV file needed to 'map' the channel data onto positions on the screen.

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,420
  • Kudos: 45
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #8 on: January 10, 2019, 02:52:05 PM »
I'm not sure if the Pi 2x16 even works anymore, I don't know of anyone still using that and I never even had one to test with.

Just out of curiousity.... what was it *supposed* to do?  Display some sort of status I imagine?
Quote
A couple years ago I added a Channel Output for another 480x320 LCD that stacked directly onto the Pi, but then when I went to give others the link, they weren't for sale anymore.  I think the newer ones use the SPI interface and mine was an older model.     Here's a demo video I did:  https://vimeo.com/216083402   The refresh rate on that one was pretty bad as well,  you can see the refresh lines in the demo video.  It definitely wasn't meant for our 20fps sequences. :)   480x320x3 is 460800 channels times 20fps times 8 bits means we would have to run the SPI output at about 75Mhz to play a 20fps/50ms sequence.

I actually think that looks pretty good in the video (especially for a $12 mini-display).   Maybe its even better with a the newer display and with newer 3B+?
« Last Edit: January 10, 2019, 03:04:26 PM by pixelpuppy »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #9 on: January 10, 2019, 03:20:22 PM »
Just out of curiousity.... what was it *supposed* to do?  Display some sort of status I imagine?

I think it showed playlist name, position, etc..  To me, it was always easier to just look at my phone.

The LCD display I used had a parallel interface, and I think I was able to get maybe 10fps out of it.  I think that test sequence is 10fps.  I don't think the newer Pi's would help much, I think the limitation was in the display itself, not in how fast we could bit bang the data out to the display.

Offline jchuchla

  • Sr. Member
  • ****
  • Join Date: Jul 2014
  • Location:
  • Posts: 355
  • Kudos: 1
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #10 on: January 11, 2019, 10:05:41 PM »
I've still got one of those 2x16 display kits here.  I've installed a few FPPs with them onboard.  It's been a long time since I've seen them though.  It gave a very basic status.  I think now playing song, time elapsed, time remaining.  It had buttons too, I can't remember what those did.  I guess I should put the kit together and see if it still works. 

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,420
  • Kudos: 45
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #11 on: January 24, 2019, 03:39:39 PM »

Well, 2 weeks later and my LCD display came in.  :)

Driver loaded easily and it came right up as the console.   
So now, the big question ......   can I configure this as a Virtual Matrix or Virtual Display?   


If nothing else, I should be able to use this as an X11 window, right?  I just wish I knew how to enable X11 under FPP  :-[




Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #12 on: January 24, 2019, 03:57:25 PM »
So now, the big question ......   can I configure this as a Virtual Matrix or Virtual Display?   


If nothing else, I should be able to use this as an X11 window, right?  I just wish I knew how to enable X11 under FPP  :-[

I think I probably hardcoded the frame buffer device name in the virtual matrix and virtual display channel outputs but that could be easily changed or worked around.

What do you see if you run ls -al /dev/fb*

Offline pixelpuppy

  • Hero Member
  • *****
  • Join Date: Aug 2015
  • Location: Dallas, TX
  • Posts: 1,420
  • Kudos: 45
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #13 on: January 24, 2019, 04:22:31 PM »


What do you see if you run ls -al /dev/fb*


fpp@FPP:~ $ ls -al /dev/fb*
crw-rw---- 1 root video 29, 0 Jan 24 16:48 /dev/fb0
crw-rw---- 1 root video 29, 1 Jan 24 16:48 /dev/fb1


I think I probably hardcoded the frame buffer device name in the virtual matrix and virtual display channel outputs but that could be easily changed or worked around.
I found a hardcoded reference in FBMatrix.cpp line 105:
Code: [Select]
   m_fbFd = open("/dev/fb0", O_RDWR);
And also at line 107:
Code: [Select]
LogErr(VB_CHANNELOUT, "Error, unable to map /dev/fb0\n");

Those are easy for me to change to fb1 and test, there are similar lines in FBVirtualDisplay.cpp  but I'm wonding if I should be looking other places too.   


There also appears to be hardcoded resolution values of 640x480 but I'm not sure if those are reset values or if I would need to edit those too (480x320)?
Code: [Select]
   // Config to set the screen back to when we are done
   // Once we determine how this interacts with omxplayer, this may change
   m_vInfoOrig.bits_per_pixel = 16;
   m_vInfoOrig.xres = m_vInfoOrig.xres_virtual = 640;
   m_vInfoOrig.yres = m_vInfoOrig.yres_virtual = 480;

« Last Edit: January 24, 2019, 04:58:21 PM by pixelpuppy »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: This $16 Raspberry Pi case has a 3.5 inch touchscreen on top
« Reply #14 on: January 24, 2019, 05:17:22 PM »
There should only be a few places to change in the code.

 The 640x480 is what we set the framebuffer back to when we exit.  The resolution for the virtual display or matrix comes from the channel output config in the web UI.

 

Back to top