My parents always complain over that they don’t get any pictures of their grandchildren. To solve this I created a picture frame that always show the last six pictures from my Instagram. The only thing I need to do is to tag the picture with a specific hashtag and minutes later the picture frame is updated with my most resent picture. I call it the InstaFrame. The picture show the prototype I made first.
Step 1: Step 1: Preparations and Get Rid of All Cables.
This instructable assumes the Raspberry Pi is installed with Rasperian, configured and up and running.
Our goal is to the rid of all cables so let’s start with the network cable;
I suggest that you use Wicd to manage the wifi. Really easy to setup and works without problem for me.
sudo apt-get install wicd-curses
Run and setup Wicd:
* Highlight the network you want to connect to and press the right cursor key to configure it
* Scroll down and check ‘Automatically connect to this network‘
* Scroll down to the botton and enter the wireless key
* Press [F10] to save.
Disconnect your network cable, reboot and now you should be wireless.
To get rid of the mouse and keyboard connect via SSH to your Raspberry. I use PuTTY.
The final cable that we need to remove is the power cable. I simply use a battery pack designed for mobile phones. And that's it! We are truly wireless!
Step 2: Step 2: Connect With VGA (optional)
I found an old PC monitor that I will use for this project. The problem is that old monitors don’t have HDMI… The solution was a VGA adapter from dx.com. But to get it running some configuration was needed;
We start with configuration of /boot/config.txt :
sudo nano /boot/config.txt
Find and uncomment (remove # ) from the following lines;
This will make the Pi run in HDMI-Safe-mode and we need to tell the Pi what resolution to use. To do this start with changing the line (in the same file, /boot/config.tx);
Then follow this link and find the selection named ”These values are valid if hdmi_group=2 (DMT)”. Find the resolution you want to use (and the monitor can handle) and note the hdmi_mode-number. For me number 16 (hdmi_mode=16) works best.
Then replace the line (still in /boot/config.txt.)“hdmi_mode=1” to “hdmi_mode=16” (or the mode number you want to use).
Connect your monitor via the VGA adapter and reboot your Pi. If it don´t show anything try with another hdmi_mode.
If you get black borders around your screen uncomment (remove #) and change the values on the following lines in /boot/config.txt until you get it as you want it;
Step 3: Step 3: Software
There are many different
sites that that can present you with code to show you Instagram pictures. I find out that http://snapwidget.com/ worked best for me and is free.
So go to http://snapwidget.com/ and select how you want your pictures to be presented on InstaFrame. The best way is to specify a unique hashtag and tag all your Instagram pictures you want to show with the same hashtag.
When you are done select “get widget” and copy the code.
Now we need to create a web page that contains this code. I use a text editor (Notepad++) to insert the code on a blank webpage.
Insert this line as well:
<meta http-equiv="refresh" content="3600">
That’s a function that refresh the page every hour. 3600 is the time in seconds. Just change it to something else if you want to.
Save the file as instaframe2.html.
I also use a a webpage named instaframe.html. The reason for this is that I need a delay for about 20s. Otherwise the page won’t load correct. So instaframe.html is only a webpage that displays "Starting in 20s" and after 20 seconds instaframe2.html is loaded. Both files are attatched if you want to use them, only change to your code from snapwidget in instaframe2.html (Instafram_HTML.rar).
Then it is time to copy our .html files to the Pi. The easiest way I think is to use Cyberduck from your PC. Download, install and run Cyberduck. Then choose “Open connection” and type in;
· IP-adress to your Pi
· Port 22
· User = Pi
· Your password
Then press “connect” and you will have a file manager on your Pi up and running. Copy the two .html files to /home/pi. Drag-and-drop works fine!
Reboot your Pi and then it’s time to install a better browser (Chromium) then the one that's preinstalled. This is done with the command;
sudo apt-get install chromium x11-xserver-utils unclutter
Now it’s time to get the Pi to open your browser automatically on boot. It shall also start in full screen mode, with no error messages and with the correct .html file.
We will start with the file autostart and edit it with this command;
sudo nano /etc/xdg/lxsession/LXDE/autostart
Erase everything in the file and paste this;
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
# @xscreensaver -no-splash
@xset s off
@xset s noblank
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/$
@chromium --noerrdialogs --kiosk file:///home/pi/instaframe.html -incognito
Depending on the Rasperian version you
might need to do the same thing with;
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Time to configure the Pi to start x on boot. This can be done in two ways. The really easy way (that didn´t work for me for some reason. It ended up with a black screen after reboot);
Choose option 3 (Enable Boot to Desktop) and then ”Desktop Log in as user 'pi' at the graphical desktop”.
Done! But as I mentioned the really easy way didn’t work for me so I had to do it the easy way;
(Test with a reboot if you need to perform this step).
Change back to “Console Text console, requiring login (default)” in raspi-config boot option.
Edit /etc/rc.local :
sudo nano /etc/rc.local
Add the following line just above the line “exit 0”;
su -l pi -c startx
We will also need to get rid of the password prompt at startup. To do this we need to edit this file;
sudo nano /etc/inittab
Place a # in front of the line “1:2345:respawn:/sbin/getty 115200 tty1”. So change;
1:2345:respawn:/sbin/getty 115200 tty1
#1:2345:respawn:/sbin/getty 115200 tty1
And just under that line we need to add this line;
1:2345:respawn:/bin/login -f pi tty1 /dev/tty1 2>&1
Save. Reboot and get yourself a cup of coffee :-) !
If everything works you shall see your Pi boot up and after a minute or
so you will see your Instagram pictures and nothing else!
Step 4: Part 4: Hardware
Time to build!
I started with a prototype made of old scrap wood. Better to make the mistakes with that than when using hardwood or massive gold…
Start with the old PC monitor and strip it clean of everything that you can remove.
Build a frame around it that is deep enough to hide the Pi and the battery pack behind the monitor.
Maybe some ventilation holes are needed as well.
I have not yet started to make my real frame, but the prototype is working fine!
That's it! Put the InstaFrame on the wall or even better; Give it away to your parents and let them enjoy pictures of their grandchildren almost in real-time!