Jirka99
Posts: 2
Joined: Fri Oct 23, 2015 10:01 am

Automatic photo frame

Fri Oct 23, 2015 10:53 am

How to make the Raspberry PI 2 automatic photo frame? So that when you turn on your browser and began to go full screen slideshow of photos on a flash drive? Without user intervention.

fruitoftheloom
Posts: 23031
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Automatic photo frame

Fri Oct 23, 2015 12:16 pm

Jirka99 wrote:How to make the Raspberry PI 2 automatic photo frame? So that when you turn on your browser and began to go full screen slideshow of photos on a flash drive? Without user intervention.
Maybe PiPresents could offer a solution:

https://pipresents.wordpress.com/features
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: Automatic photo frame

Fri Oct 23, 2015 1:49 pm

Code: Select all

apt-get -y install fbi
fbi -t 10 -a *.jpg
Antikythera

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Automatic photo frame

Fri Oct 23, 2015 7:39 pm

Jirka99 wrote:How to make the Raspberry PI 2 automatic photo frame? So that when you turn on your browser and began to go full screen slideshow of photos on a flash drive? Without user intervention.
I would store the images in the /tmp directory so they aren't having to write to the flash drive all the time. Then you can get them from somewhere else as needed, in bash with something like:

while true
do
scp user@pictureHost:/tmp/pic.jpg /tmp/pic.jpg
fbvis /tmp/pic.jpg
rm /tmp/pic.jpg
sleep 1s
done

Then, over on the pictureHost, you can change the image as you see fit. So you could copy in a list of images or make up custom ones. It would be cool, I think, to have the picture frame show a picture and have a clock display, perhaps some weather forecast, things like that.

You can do all these things over on the pictureHost or you can do them on the RPi, although I'd keep the display aspects and the construction of images separate even if all are done on the Pi. You can have multiple ip addresses such that pictureHost and the photoFrame are different meaning later you can easily change which physical boxes they are on without really having to change the coding you wrote.

User avatar
rpdom
Posts: 16968
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Automatic photo frame

Fri Oct 23, 2015 7:56 pm

stderr wrote:
Jirka99 wrote:How to make the Raspberry PI 2 automatic photo frame? So that when you turn on your browser and began to go full screen slideshow of photos on a flash drive? Without user intervention.
I would store the images in the /tmp directory so they aren't having to write to the flash drive all the time.
What makes you think the /tmp directory isn't on the flash drive (SD card)?

Plus /tmp/is a silly place (like /camelot) to put stuff that you want to be there when you boot up...

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Automatic photo frame

Sat Oct 24, 2015 5:08 am

> What makes you think the /tmp directory isn't on the flash
> drive (SD card)?
>
The tmpfs should be in memory. It could be swapped out, but if you don't have swap, it will be in memory.

> Plus /tmp/is a silly place (like /camelot) to put stuff that you want to
> be there when you boot up...
>
If you are serving up your photoframe images as you want them displayed, you don't want the images there on boot up. If you just want to loop through some photos that never change, that's up to you, but if you want control of what is displayed, I think not writing them to the flash drive can make more sense. This is especially true if you are serving up custom jpgs that include the clock and weather data I was talking about.

User avatar
rpdom
Posts: 16968
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Automatic photo frame

Sat Oct 24, 2015 7:19 am

stderr wrote:> What makes you think the /tmp directory isn't on the flash
> drive (SD card)?
>
The tmpfs should be in memory. It could be swapped out, but if you don't have swap, it will be in memory.
Is your /tmp a tmpfs? None of mine are.

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Automatic photo frame

Sat Oct 24, 2015 3:21 pm

rpdom wrote:
stderr wrote:> What makes you think the /tmp directory isn't on the flash
> drive (SD card)?
>
The tmpfs should be in memory. It could be swapped out, but if you don't have swap, it will be in memory.
Is your /tmp a tmpfs? None of mine are.
I sure thought they were but maybe that was a different distribution, "Arch uses a tmpfs /run directory, with /var/run and /var/lock simply existing as symlinks for compatibility. It is also used for /tmp by the default systemd setup", https://wiki.archlinux.org/index.php , or the same one on a different day: This person claims that Deb enabled it and then disabled it: http://www.legendiary.at/2012/03/21/deb ... y-default/ .

Whatever is true by default right now, I think that writing to and erasing again something over and over again all the time is probably something to put into tmpfs. I know that /run is tmpfs on these systems, I just looked, so certainly /run/shm should be therefore I guess that's the place to put these files unless one wants to mount /tmp explicitly as tmpfs. I know people say that sdcards can take a lot of writes compared to what some worry about but having had them messed up on the RPi and other systems, and suspecting that they are a bit dodgy out of the gate, I'd say err on the side of not writing to them any more than needed.

Thanks for the correction.

Return to “General discussion”