boarddesigner
Posts: 19
Joined: Wed Feb 08, 2017 5:35 pm

Using 1.8" TFT as camera viewer

Mon Feb 13, 2017 11:10 pm

I have a sainsmart18 tft up and running on my PI. A couple of problems I have:
1. Cannot get screen to rotate. What do I need to configure for this to work?
2. I am trying to use screen as camera previewer. What do I have to do to get the camera to send image to fb1?

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Using 1.8" TFT as camera viewer

Tue Feb 14, 2017 8:44 am

Hi,
1..assuming you are using fbtft driver for the display, there is a rotate option in the /boot/config.txt file, eg

Code: Select all

dtoverlay=hy28b,rotate=270
is used for one type of display.

2..you can 'copy' the hdmi output to fb1 with a background task call fbcp - search the forum or google for it. This app will mirror image from hdmi to your display.

Hope this helps,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

boarddesigner
Posts: 19
Joined: Wed Feb 08, 2017 5:35 pm

Re: Using 1.8" TFT as camera viewer

Thu Feb 16, 2017 1:23 am

Excellent.
This is exactly what I was looking for. Regarding mirroring. I will have to play with some of the settings to get this perfected. it appears my cursor remains in the lower end of display. during mirror session. I will need to work on this.

fbtft
I think I might have done something out of date regarding the boot/config.txt file. I am not using the dtoverlay.
I had found a process on the web that had me put define my fbtft in the ( /etc/modprobe.d/fbtft.conf ) file.
Here is the fbtft driver i am using: sainsmart18
the fbtft.conf file contains this line:
options fbtft_device name=sainsmart18
Should I reconsider this?

Texy,
Thank you so very much for being awesome on this. Big help as I am so new it hurts.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Using 1.8" TFT as camera viewer

Thu Feb 16, 2017 7:20 am

boarddesigner wrote:Excellent.
This is exactly what I was looking for. Regarding mirroring. I will have to play with some of the settings to get this perfected. it appears my cursor remains in the lower end of display. during mirror session. I will need to work on this.

fbtft
I think I might have done something out of date regarding the boot/config.txt file. I am not using the dtoverlay.
I had found a process on the web that had me put define my fbtft in the ( /etc/modprobe.d/fbtft.conf ) file.
Here is the fbtft driver i am using: sainsmart18
the fbtft.conf file contains this line:
options fbtft_device name=sainsmart18
Should I reconsider this?

Texy,
Thank you so very much for being awesome on this. Big help as I am so new it hurts.
If it's working to your satisfaction, then why change it? But the method has changed from your current solution.
You should find an overlay for your display in /boot/overlays/ if you want to go for the more modern approach.
Here is an example of how to use the device tree method of fbtft :
viewtopic.php?f=45&t=105797

You can ignore the instructions from step 6 onward, assuming your display does not have touch facility.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

boarddesigner
Posts: 19
Joined: Wed Feb 08, 2017 5:35 pm

Re: Using 1.8" TFT as camera viewer

Fri Feb 17, 2017 6:00 pm

Texy,
This is the information I needed. It appears there is no direct overlay for the sainsmart18. I could very well be wrong though. But I did find out how to create an overlay. I will have to look into creating overlays when time allows. Agreed, why change it.


Thanks again.
a-

Return to “Troubleshooting”