Josef “Jeff” Sipek

Raspberry Pi

Two weeks ago, I decided to do some hardware hacking. After a bit of reading up on embedded boards, I ended up buying a Raspberry Pi B+. It’s essentially a slightly smaller form factor version of the B, that has more GPIO pins and uses microSD cards instead of SD cards.

I hooked it up to the TV and played with Raspbian and RiscOS a little bit. As you may have guessed by now, that was not enough fun for me. I just had to boot a custom OS that talked over serial. :) This of course required some way to connect the Pi to something that can talk serial. But that’s a post for another day. :P This post is going to be about my impression of the Pi, as well as a cute little use I found for it over the past week.

Impressions

The Pi is a rather small board. The B+ is even smaller. A lot has been written about the technical side, so I won’t bother.

I was rather impressed with how much punch this little board packs. The hardest part about getting it going was putting it in the case (I got one of those kits because it was cheaper than buying everything separately). The built-in 4-port USB hub ended up quite useful. It allowed me to plug in both a keyboard and a mouse and have NOOBS installing Raspbian and RiscOS within minutes. A quick reboot later, I was at a shell prompt. That’s where the “new toy high” wore off a little. (I know I’ve talked about this with people before — it’s cool to be portable, but it’s also boring since the architecture becomes irrelevant.) I had a shell, and the most creative thing I could think of was to look at /proc/cpuinfo and /proc/meminfo.

I do have some thoughts about where the Pi B+ could have been better. The B version used an SD card. The B+ uses a microSD card. I consider this a bit of a regression. I have a bunch of older SD cards and an SD card reader that works well with SD cards. Sadly, this card reader (using a microSD adapter) fails to play nice with the SDXC modernization of SD that all microSD cards seem to use. I have the same issue with other microSD cards, so I’m pretty sure it’s the card reader. This makes updating a bit more of a pain.

The other thing I wish the Pi had is a DB9 RS232 connector. I have USB serial dongles that work well, but to talk serial to the Pi one needs to either get a level converter or a TTL serial to USB cable. I ended up getting a cheap USB cable with a fake Prolific chip inside. It works, but I hear Windows users are having a terrible time with evil drivers from Prolific.

Storm Timelapse

A little over a week after getting the Pi in the mail, we got a large storm heading our way. I got the brilliant idea to set up a webcam in an upstairs window. Previously, this would involve digging up an old computer, setting it up by the window, etc. This time, I reached for the Pi. I connected a webcam to one of the USB ports and a cheap WiFi USB adapter to another. A short config later, Raspbian was on the network even though there’s no network drop in sight.

I didn’t want to abuse the microSD card for storage of images, so I mounted an NFS share from the storage server in the basement. I had to use the nolock option to make the mount happen. I probably could have figured out why the lock manager was not running, but it was a temporary setup so a “quick hack” was all I did.

To capture images from the webcam, I ended up installing fswebcam, a small program that does one thing and does it well. I started up screen, and ran fswebcam with the following config.

device /dev/video0
input 0
loop 5
resolution 800x600
timestamp "%Y-%m-%d %H:%M:%S %Z"
jpeg 95
save /mnt/webcam/%Y%m%d/%H/0_%Y%m%d_%H%M%S.jpg
palette YUYV

Then, downstairs on my laptop, I mounted the same share and watched the files appear every five seconds. I ended up running the webcam for two days.

Here’s a couple of stills from the 27th:

And here’s a couple from the 28th:

I did make a quick timelapse, but I haven’t tried to figure out a reasonable set of codec options to not end up with 300 MB of video. Maybe one day I’ll find a good set of options and upload the video here. Here’s what I used:

ffmpeg -framerate 30 -pattern_type glob -i '20150128/*/0_*.jpg' \
	-b:v 5000k -g 300 /tmp/out.mp4

Anyway, that’s it for today. I’ll write again about the Pi in the near future — from an OS developer’s perspective.

ICON XXVII

It is that time of year again…it is time for ICON! Well, it was time for ICON as it is over already. I took a fair amount of photos, to sort of document the 2.5 days - to make people want to go next year.

Friday

Friday is always a half-day, unfortunately, this year, I didn’t find many must-see panels (the Saturday is always the best anyway), so I used the time to pick up my badge and to spend some quality time with my friends. Hrm, looking at the schedule again, I see I missed a few things that would have been interesting to go to…oh well.

Saturday

As I just said, the Saturday at ICON is the best. The moment I got on campus, I could just look in a random direction and see something worth photographing. So, no to bore you too much with meaningless rambling, here are some photos…

This was the first photo I took, unfortunately it is blurry because I didn’t realize that I was still on manual focus :-/

Chicken, et.  al.

About 30 seconds later, I ran into this guy…he’s at ICON every year, and every time he has a “mobile” of some sort…This time around he had the bottom part of a Dalek from Dr. Who.

*mobile

About 30 seconds later (I told you, random direction & take photo would have worked):

no clue

Ah, and then I saw these guys getting ready to beat the crap out of each other:

Let’s get medieval

While resizing the photo to fit onto this page nicely (the original 6.1 megapixel image would be a bit too wide for most screens, not to mention the amount of data that’d have to be transfered!), I noticed that these knights were wearing:

A shoe is a shoe

If there’s something strange in your neighborhood, who you gonna call? My suggestions would be to call the owners of the following vehicle (they come every year, as far as I know):

Who you gonna call?

Parked right next to it, you had (unfortunately, there was no flux capacitor):

88 miles per hour!

The driver looked kind of alien, not to mention a bit green…

Yoda

Throughout the con, you had plenty of armed forces of all types roaming around:

no comment

And of course, if you have those guys, you got to have…dramatic, symphonic music indicating a bad guy is about to make an appearance

a fan + Darth Vader

Then I went to wait for an autograph of Jeffrey Combs, who plays a bunch of characters on Star Trek. After a rather short wait on a line, I got an autograph on a 8”x10” photo of Wikipedia article: Weyoun, and Jeffery Combs wrote on it: Jeff… Long Live the Dominion. <signature>Weyoun</signature>. Pretty cool, if you ask me :) In addition to the autograph, I also got to take a photo with him…

Jeff and Jeff

Costumed folks…

Master Shake

More people, in front of the ticketing booth:

The ticketing booth

Then, going back outside, I got two photos of dragons. The first one is a bit overexposed (the flash fired) and the second is much better exposure-wise. Somehow, I like how the first one turned out anyway…

Dragons

Dragon

Then, I was off to the Q&A session with Jeffrey Combs. I took quite a few photos, most of them were ok, but not great…I guess I need a better lens :-/

Q&A session with Jeffrey Combs

Right after the Q&A session, there was another session, with Tim Russ, who played a few characters on Star Trek. I got a photo of the two talking for about a minute:

Combs and Russ

Tim Russ’ Q&A session was fun, he made fun of William Shatner for overusing, and over-extending dramatic pauses, he even read a silly script idea.

Tim Russ

After the Q&A session, Tim Russ did an autograph session. I decided that I didn’t have enough time because of a panel I was supposed to go to (and he was going to have another on Sunday anyway), and so I just quickly ran up to the indoor track, and took a bunch of photos with the intention to make a panorama:

Dealer room

If you want to see the full-resolution image, no problem, just beware that it is almost 4MB jpeg file (6561 by 3336 pixels).

And back to people shots…

no clue

I don’t remember seeing anyone dressed as Pikachu, so here’s a Pikachu toy thing:

Pika!

A dude dressed as a wolf thing of some sort, a dude (the bloody looking one) with a chainsaw for his right hand (unfortunately blocked by the wolf creature) dressed up as Ash from Evil Dead/Army of Darkness, and someone as Temari from Naturo:

A trio

I dare not say his name! (Plus a Luigi in the background.)

Beatlejuice!

No idea what kind of deeper meaning there might be, so I’ll state the obvious… It is a wolf/fox of some sort.

no idea

Seeing this amused me greatly:

again, no idea

And last photo for the day, a Mario & Luigi (different from the one above) combo:

Mario + Luigi

Then it got dark, and I got more busy attending panels so that’s it photo wise.

Sunday

I took only a few photos for the entire day. I didn’t feel like taking more photos of the people I already got on Saturday, and overall, the costumes aren’t as numerous on the last day.

Here’s some conference goer getting a photo with a (real, from the movie) Ghostbuster (Ernie Hudson, if I remember correctly):

Ernie Hudson (left)

A conference goer dressed up in SG-1 base uniform: Conference-goer

LIARS (a somewhat unfortunate acronym of the Long Island Advanced Rocketry Society):

LIARS

I messed up the exposure for the few photos (these are the best 2) of the medieval folks:

Ouch

Ouch, again

And that’s it photo wise. I did get my Tim Russ autograph; I went to some more panels, virualy all of which were enjoyable (the panel about taking over the world got canceled :( ).

Randomness

After ICON ended, a bunch of us went to get dinner. After eating, and talking about politics at a very interesting level (not about the upcoming election, but about things like FISA, etc.), a friend of mine and I decided to go outside and take a bunch of photos of a building and try to make a high dynamic range photo.

The taking photos part was pretty simple, it took about 20 minutes to take the five good photos (1, 2, 4, 8, 15, and 30 second exposures).

Then we went back to the lab, and loaded them up in qtpfsgui. This program does two things…

  • Combines the photos into one with higher dynamic range
  • Optionally, Wikipedia article: tone maps

The building we picked doesn’t really lend itself all that much to high dynamic range photography - well, it’s somewhat hard to spot the few places where the higher dynamic range helps. We tried the tone mapping, and the best two algorithms were Reinhard and Fattal.

First, Reinhard. It has a pretty natural look (at least compared to what Fattal produced), but at the same time, it feels…unreal.

Reinhard algo

We actually ran Fattal twice. Once with and once without noise reduction. The one without looks quite artsy, at least in my opinion.

Fattal algo

And the one with noise reduction looks a lot like it was drawn with colored pencils:

Fattal algo with noise reduction

I love the outcomes, and I’m pretty sure I’ll try to make more tone mapped images.

Powered by blahgd