Pudding is good.

About Me

Brianlee.org is a silly place. Its about my life, family, general stuff. Currently I have been trying to pickup photography. Hopefully I will get better at it someday.

Digital Picture Frame

Update: With some help from Erik Greenwald, I was able to get rand to work right with vp. So I have a updated perl script (perl script is at the bottom), and a fix for rand. For rand to work, I had to edit the rand.c that was in the src directory. at the bottom, it says ‘return 0; }’ with Erik’s help, he said it should say ‘return EXIT_SUCCESS; }’. So thats all you have to do. recomplie it, and it should work.

So, I wanted to have a digital picture frame so I could show off my picture that I have taken with my camera. My co-worker pointed me to this. they made one with a old Mac they had. So I was thinking, heck I can do that with Linux on a old laptop that I Have. So I took a Toshiba Tecra and used it…

First step was to get Linux installed. I tried RedHat but it was never that stable for me. So on a whim I tried Mandrake 9.0, and it worked really well. I was expecting it to not work at all. So, with a OS that was working I could move on to the next problem.

The second step was to get something to view the pictures. I wanted something that was lightweight and easy to install. I did some looking and found VP made by Erik Greenwald. It is a SDL base view, and it can be run from the command line. That made it really easy to use.
I did have to install SDL, and SDL_image before VP would install. but that was not a problem at all. You can find both of them at SDL’s website.

Third step was to get Linux to auto magically login. A google search found me this. qlogin was exactly what I was looking for. and on top of autologin, it can run a command after it logs in. So I just killed 2 birds with one stone.

The next thing that I had to over come was when you boot the system into runlevel 3, it would not use the whole screen. It by default would run it at 640×480. After much searching, I found that you can pass the screen size with lilo. So I edited /etc/lilo.conf, added vga=788 (which means 800×600), rebooted, and nothing happened. After about a hour of trying different things, I found out that you need to run lilo as root. after that it worked perfectly.

My next step was to setup a perl script so that it would keep running vp. Here is what I did:

system "rm -rf /root/picture.txt";
system "find /root/images -maxdepth 1 -type f > /root/picture.txt";
$i = 1;
for(; $i > 0; $i++)
{
#For a random picture cycle. it will not restart once it gets to the end of the list.
#system "cat /root/picture.txt | /usr/local/bin/rand | xargs /usr/local/bin/vp -s 960000";
system "cat /root/picture.txt | xargs /usr/local/bin/vp -s 960000";
}

Now, on to the building of it….
I started off with this laptop (with the keyboard already off.)
Starting

Once, I got it all apart I could see what I was working with. Since it’s an older laptop, the motherboard was large. Very large. So, with the display sitting over it did not cover all of it.

But that’s ok, I wasn’t really planning on it covering all the way anyways. The problem was how deep the motherboard was. So, it was a little more work to get it to look nice. I wanted the cdrom drive to be accessible from the top. So that meant the display needed to be flipped, and I was worried that the cables would not be able to reach. but I lucked out, and was able to make it work.

The backlight power inverter was stretched a little, so I had to tape it to the back of the display.

And since I had the power inverter running over I couldn’t have the motherboard sitting right on it, so I had to get creative again.

I gave it some spacers…

And then put some balsa wood over it. So that fixed that problem.
So, the next thing was to some sides on it, and put the motherboard in.

It was hard getting it to line up right. and I got some thick balsa wood so that it would be strong. large motherboard = heavy motherboard. But aside from that it worked out well.
Then it was time to put a back on it:

The next step was to see if it booted up……

BOOYA! it worked. After that, I just had to do some tweaking. I put the back that came with the picture frame. it made it look a little nicer.
The way it is with the cdrom drive at the top, it works as the drive plus a heat vent. So, I hope it doesn’t over heat.

Here are some pics of the final product.

And I was left with a bag full of trash, just from the laptop its self.

My final conclusions on this project:
It was a nice challenge to do it, and I had fun working on it. really, the hardest part was getting the software to work right. After that, it was working with the wood. Since I only had a exacto knife, it was more of a problem. One of the problems of living in a apartment is no power tools. Anyways. It works well, and I like it. I got the frame from target and it looks slick. All in all I had fun, and it worked. So I am very happy with it.

Here is the perl script:
#!/usr/bin/perl
system "rm -rf /root/picture.txt";
system "find /root/images -maxdepth 1 -type f > /root/picture.txt";
system "mount /dev/cdrom /mnt/cdrom";
system "find /mnt/cdrom -maxdepth 1 -type f >> /root/picture.txt";
$i = 1;
for(; $i > 0; $i++)
{
#For a random picture cycle.
system "cat /root/picture.txt | /usr/local/bin/rand | xargs /usr/local/bin/vp -s3840000 ";
#the time delay has been extended to 1 hour.
#system "cat /root/picture.txt | xargs /usr/local/bin/vp -s 3480000";

}

-Brian

XHTML RSS