posts tagged with the keyword ‘tlbot’

2013.09.06

CameraPi

If you wondered why I needed a Raspberry Pi case that could also hold a Raspberry Pi Camera… well, seriously, don’t you people know me by now!? :)

This ‘CameraPi’ is a prototype for Time Lapse Bot 4, and if you’re not familiar with my time lapse hardware experiments, check out the Time Lapse Bot project page for a good introduction.

My Time Lapse Bots have always relied on old computers, and while you can typically get old computers pretty cheap, they are also, well… old. They run old software, they often have hardware failures, non-working batteries, are heavy, and a lot of other things that are (sometimes) fine, but sometimes annoying.

Enter the Raspberry Pi, a small, inexpensive, low-power, modern Linux computer that can use an add-on camera module to create an all-in-one solution to time lapse captures. This is the kind of stuff I love playing with!

So here’s the story of making the CameraPi. I’ll avoid getting into code at this post and just talk about the process and some applications.

At raspberrypi.org I grabbed the NOOBS install, mainly because I wanted to test it out, and it worked well! I went with Rasbian. I think it had all the camera software baked in, but if not, it’s easy to add.

AppleTalk

Once up and running, I added Avahi to give the Raspberry Pi a nice network name (camerapi.local) and I also installed Netatalk to allow my Mac OS X machines to easily connect to it. Neither of these are required for the camera stuff, but I tend to drop these on most Linux machines I use.

As for the image capture, while the camera utilities have some time lapse capabilities, they did not work for me, which is fine, I created my own. (I should note that the Raspberry Pi is for educational use, so I try to follow that idea and, well, learn a lot while using it.)

I wrote a simple bash script to capture a new image every 60 seconds. You can set whatever interval you like, but I like 60 seconds. For one day that gives you 1440 images, if you’re keeping track at home. Depending on your image size and compression settings that could be over 1GB per day of still images. I’m currently using 1280×720 for my image size, as that works well when compiling video.

Photo

As long as we’re capturing images every minute, why not have a way to display them remotely via a web browser? Sure! I also installed Apache for that. There are lighter HTTP servers, but I like Apache. I wrote a simple CGI script to grab the latest image file and display it on a page… and there’s also a link to all the images for the day. Oh, and the page auto-refreshes so it keeps showing the latest image. (The images are named like so: 20130905140427 using the YYYYMMDDHHMMSS format.)

Files

OK, so we now have this running archive of photos. At some point (like, the second day) you’re going to have way more images in that folder than you want. Another shell script is the answer! Script #2 runs after midnight, grabs the date of the previous day, and moves all images matching that date to their own folder. (Oh, where do we store all these images? On a tiny USB thumb drive. It’s an 8GB drive. We figured filling that was better than filling the SD Card that contains the system.)

Files

Now we’ve got a folder named 20130905 with 1440 images in it. We should probably do something with it… Make a video! Once the files are moved we run a command with mencoder to compile all the JPG files (sorted by name, which is also sorted by date) into an AVI file. I don’t really care for AVI files though, so when that is done (and, it takes about 6 hours due to the high-quality encoding settings I use) we then use avconv (which used to be ffmpeg, sort of, oh, Linux!) to convert the AVI to an MP4 file. That does not take hours. This is all messy and could be done better.

Video

So after all that, we now have an MP4 file we can view in our browser, though it’s a silly MP4 that needs to completely load before it starts. Silly! There must be a better way.

Yes. There must be a better way. I’m sure there is. Here’s the thing. I really just started hacking. I didn’t know where I was going, so it’s all been guessing and trying things along the way. That’s the beauty of it. I’m not building this for a client. I’m not building a commercial product. I’m just playing and learning. I love it.

Oh, I forgot, I also set my capture script to launch at startup as a service. That means it also stops cleanly when you halt the system. Also, you can halt the system via another CGI just by loading a web page. Secure? Probably not. Ideally I’d like to be able to have the Pi create a WiFi network I can attach to from my phone and control. That would be nice. I’m sure it’s doable, I just need to dig in more. Dig. In. More.

Well that was fun! Thanks for reading this. If anyone really wants more info on the code, I could clean it up a bit (or not) and post it. As always, improvements are very welcome.

Update: Here’s an example video.

2012.04.04

DamCamp

DamCamp (aka BarCamp Beaver Dam) happened on Saturday, March 24th, 2012 and this is my review…

First off, I will shout out a big thanks to Jason Gullickson, his wife, Wayland Academy, the Beaver Dam Makerspace Project, and anyone else who helped organize the event and made it happen.

Wayland

The Venue
DamCamp was held at Wayland Academy, which is a coeducational college preparatory boarding and day school in Beaver Dam. The main room was an auditorium, which was full of seats, a stage, large screen, and projector. There were two other rooms we were going to use, but we really ended up just using one other room, the lab, where the 3D printers were set up. The venue was easy to get to, and there was plenty of free parking! :)

The People
This was the smallest BarCamp I had ever been to… and that isn’t a bad thing. I remember times in BarCampMilwaukee history when some people were very focused on the numbers, and personally, I prefer quality over quantity. If the right people are there, that’s better than more people being there.

I saw people I knew who I haven’t seen in a while, met some new people, and met people IRL that I’d only met online before. What more could you ask for?

Time Lapse Bot 3

My Junk
If you’ve been to a BarCamp with me, you know I tend to bring a lot of stuff. I’ve been known to bring a photo booth, cameras, tripods, audio recording gear, tables, 200 feet of extension cords, power strips, and on and on. This time I brought Time Lapse Bot, the Egg-Bot, Friday Night Drawbot, my still camera, and not much else. It only took me about 3 trips to load in! (And I found it quite refreshing.)

Friday Night Drawbot

The Sessions
After the opening and introductions we launched into the first session… which happened to be my session. I gave a quick talk about some art robots that I like, and my take on what an art robot is (and isn’t) and then did a demo of the Friday Night Drawbot and the Egg-Bot. (Slides are here.)

I did not keep track of all the sessions, but we did one on 3D printing (there were 3 RepRaps there) and one on creating hackerspaces/makerspaces, and one on making noise with electronics. I ended up getting a lot of good info from the 3D printing session, and I’m a bit more motivated to find the time to finish my RepRap build. (Less sleep is the obvious answer!)

In conclusion, I had a good time, and I learned things. It was a small event, but I don’t think that detracted from it at all. In fact, I wouldn’t mind seeing more smaller events. BarCampMilwaukee is big, and it’s awesome, but it’s also a lot of work, involving a lot of people. Perhaps both ends of the spectrum can co-exist.

If you haven’t been to a BarCamp event yet… why not!? Maybe you’re more into food than technology. Well, you should consider attending Madison Food Camp which is coming up April 7th, 2012! (Yes, I said “Food” not “FOO”, just to be clear.)

2011.09.27

Time Lapse Bot was at BarCampMadison4 (aka MadCamp) on August 27, 2011, and I forgot to put this together until this week. You may notice I used the same music as last time. Well, so goes it. Enjoy the video!

This video is released under a Creative Commons Attribution License. The music titled “Freedom (Techno Plano Mix) ” is from Gurdonark via ccMixter and has a Creative Commons Attribution Noncommercial License. You can also find this video at Vimeo… Enjoy!

2011.04.19

Time Lapse Bot did managed to make it out to the Grand Opening at the Milwaukee Makerspace, though he was somewhat neglected when up against Egg-Bot and Drawbot

Can’t all the robots just get along!?

2011.02.27

This is a video about ice melting.

Yes, I’m totally serious, because as you probably know, I only make serious videos.

Actually, this video came about when we had the big snowstorm back on February 2nd, 2011. Everything was shut down, so the Doctor and I stayed home and did a whole lot of shoveling. We also played in the snow a bit, and she brought in these huge icicles I knocked off the house. We put them in the sink to melt, and as usual, I figured I should put Time Lapse Bot to use and record things. Little did I know it would take so long…

It took 27 hours for the ice to melt. It probably helps that our house is usually between 55 and 60 degrees. If you see any water splashing onto the icicles, it’s just due to the fact that I had to wash dishes at some point. Other than that, we were able to pretty much leave them undisturbed, though next time I’ll probably set things up in a tub in the basement.

Anyway, I hope you enjoy this video of ice melting… even though it took 27 hours to film it, you should be able to watch it all in about 20 seconds.

« Older Entries |

buy the button:

Buy The Button

recently at:


top recent artists: