User avatar
tedhale
Posts: 114
Joined: Thu Sep 20, 2012 4:52 pm
Location: Williamsburg, VA, USA
Contact: Website

instructions for creating a digital picture frame

Sat Feb 09, 2013 9:30 am

Step by step instructions for creating a digital picture frame have been posted on my blog
http://raspberrypihobbyist.blogspot.com ... frame.html
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: instructions for creating a digital picture frame

Sat Feb 09, 2013 9:34 am

Very cool! Well done.

User avatar
DexOS
Posts: 876
Joined: Wed May 16, 2012 6:32 pm
Contact: Website

Re: instructions for creating a digital picture frame

Mon Feb 11, 2013 1:09 am

That's is so much work to make a simple picture frame :shock: .
You could do it in bare metal simpler.
Code

Code: Select all

include 'DexBasic\DexBasic.inc'

load   BmpImage, ScreenBuffer
sync
goto   MissFirstDelay2screen
Beginning:

load   BmpImage, ScreenBuffer
syncs

MissFirstDelay2screen:
delay  80

load   BmpImage2, ScreenBuffer
syncs
delay  80

load   BmpImage3, ScreenBuffer
syncs
delay  80

load   BmpImage4, ScreenBuffer
syncs
delay  80

load   BmpImage5, ScreenBuffer
syncs
delay  80

load   BmpImage6, ScreenBuffer
syncs
delay  80

goto   Beginning

align 4
BmpImage:
file 'Images\Image1.bmp'
align 4
BmpImage2:
file 'Images\Image2.bmp'
align 4
BmpImage3:
file 'Images\Image3.bmp'
align 4
BmpImage4:
file 'Images\Image4.bmp'
align 4
BmpImage5:
file 'Images\Image5.bmp'
align 4
BmpImage6:
file 'Images\Image6.bmp'
align 4
ProgramSize:
ScreenBuffer:                 
You then stick the kernel.img on a fat32 formated sd card and boot.
Its comes on in two seconds and you can turn it off, by just powering it off.
See here: http://www.youtube.com/watch?v=Hc-5epQTul8
Batteries not included, Some assembly required.

johnnygill
Posts: 1
Joined: Mon Jun 23, 2014 9:54 pm

Re: instructions for creating a digital picture frame

Mon Jun 23, 2014 10:01 pm

After so much searching, I couldn't find the solution to what "I" needed.
Thought I should document as much to my ability, in case someone else needs/wants to do this too.

Things to know:
I know very little about linux, but I’m a PC tech, so enough Logic to get by. Half the linux commands I don’t understand, but I know what most of the do, and the purpose they serve.
I’m using a Raspberry PI B rev2. Running cat /etc /issue returns:Running Raspbian GNU/Linux 7 \n \l
To run this manually, you need to be in the startx/KDE graphical interface – I don’t even know what it really is – Xwindows(?) – then initiate the script to run it. You cannot do this via a Telnet/SSH console session. Although you can program all this via console, and reboot the PI, which will autostart and output to your display.
Scenario:
PI setup and working on home wifi network, plugged via HDMI to 24” spare “pictureframe” monitor.
NAS shared folder \\servername\pictures with over 100,000 photos in hundreds of sub folders – mostly only 1 folder deep from the root share.
I want the PI to autoboot and start randomly displaying photo’s, changing every 3 minutes.
After much searching, found pqiv to be about the only package that will do this. I struggled to get this working initially, and found a fix, but then found upgrading to the latest version was needed for the features like recursive subfolder searching. See end of this for some things I did if you can’t get PQIV to work.
This assumes you have already installed PQIV ;-) (google it if you need help)
==================================================================================
Firstly - Create Network link to fileshare
Install smbclient and create sym link to fileshare path
Sudo apt-get update
Sudo apt-get install smbclient
cd ~
mkdir /home/pi/pics #I’m anal about making sure I put things in the right spots.
sudo mount –t cifs –o username=pi,password=pipassword //servername/pictures /home/pi/pics
To test this now works;
cd ~/pics
ls
That should display all files and folder from your network share as if they’re on the pi in the pics folder!
==================================================================================Setup automount of fileshare to pics folder
sudo vi /etc/rc.local
add the line before “exit 0”
sudo mount –t cifs –o username=pi,password=pipassword //servername/pictures /home/pi/pics
Esc :wq! Enter and Y to save
This doesn’t always work for me. Sometimes I don’t think the wifi has established yet, so this fails. Although I have included in the actual slideshow script anyway – which fixes it, if it didn’t work at boot time
==================================================================================


Turn off sleep/monitor power save in console
sudo vi /etc/kbd/config
Find the lines and change to the following:
BLANK_TIME=0
POWERDOWN_TIME=0
Esc :wq! Enter and Y to save
==================================================================================
Something else that stops the screen blanking – this is for booting straight into X
sudo vi /etc/lightdm/lightdm.conf
In that file, look for:
[SeatDefault]

and insert this line:
xserver-command=X -s 0 dpms
==================================================================================
Autostart the slideshow when startx/KDE autoboots
Cd /etc/xdg/lxsession/LXDE
Sudo vi autostart, a to add line, or i to insert
Add a line
@/home/pi/slideshow
:wq! To save and exit
==================================================================================

Create the slideshow script
Sudo vi slideshow, “i” to insert and add the following lines:
#!/bin/bash
sudo mount –t cifs –o username=pi,password=pipassword //servername/pictures /home/pi/pics/
pqiv –f –F –s –t –d 180 –l - -low-memory - - shuffle ./pics
:wq! To save and exit vi, then type
chmod +x slideshow - to allow executable
Run startx to load the KDE – and load a terminal window, then type slideshow – it should take over full screen and start displaying images. Escape will exit it.
==================================================================================
Then run sudo raspi-config and set start to boot to X, and not console, then at bootup, your PI will auto login to KDE (startx) and autostart your screensaver session.
Initiate;
sudo reboot
==================================================================================
To Create a KBD(startx desktop) autostart desktop shortcut and script to run
cd ~/.config
mkdir autostart
cd autostart
sudo vi slideshow.desktop
press "i" to insert, paste the following lines, then press the esc button and then ":wq!" to save and quit:
[Desktop Entry]
Type=Application
Exec=/home/pi/slideshow


Some install stuff I did PQIV updated to latest version
Go https://github.com/phillipberndt/pqiv/ and download and install as instructed I think was my final step, and its working fine… some rambling things after going through my history below
Mucked around, and mucked it up. But googled lots.
sudo apt-get install pqiv
Then to check version, run: man qpiv
the version I ended up with is (1) = a 1 in brackets when I run man pqiv
It must have the - - shuffle option in the man pages
At some stage I had to download pqiv manually and install it using:
sudo make install
sudo install pqiv /usr/bin/pqiv
I followed the following first to get pqiv installed and working – and this did work. But I wanted the functionality that the newer version of pqiv offered (recurse subfolders etc). The version below doesn’t do this – although it displayed the photos for me, which was great – on the right track.
I suggest to NOT do this bit unless your pqiv doesn’t work. You’ll just have less features etc – it’s not the hard bit in all this .

The variable "option" (not "options") in the function main() is of the wrong data type.
Use gint instead of gchar (source line 2233/2705, version taged as 0.12),
otherwise the code depends on whether the char data type is signed or unsigned.
With unsigned char type the result of getopt(source line 2303/2705) is interpreted as 255 and will never get < 0.

To build the app on a raspberry pi you need the following:
(if you do no have debian wheezy, things may look different)

# remove the installed version
sudo apt-get remove pqiv

# install the required packages to get the source from git and compile it
sudo apt-get install git libgtk2.0-dev

# as user pi in the user home directory (/home/pi), this will create a sub directory 'pqiv'
git clone https://github.com/phillipberndt/pqiv.git -b 0.12

# configure will validate all preconditions and create a platform specific make file
cd pqiv
./configure

# now it's time to make the fix in the source code
replace "gchar option;" by "gint option";
in the variables declaration of the main() function in pqiv.c.

# make and install the app
sudo make all install

# that's it, you have a fixed version of pqiv

Return to “Other projects”