Tag Archives: Raspberry Pi

Raspberry Pi to Banana Pi migration

You might have noticed that my site was down for maintenance on Wednesday, 2014-09-17. For better WordPress performance, I decided to migrate my blog to a brand-new Banana Pi server, featuring a Cortex-A7/ Allwinner A20 Dual-core CPU with Mali-400M2 GPU — that’s cheating — I know 😀.

Let’s go bananas … !

It took me a couple of hours and some tinkering to move my WordPress installation including the MySQL database onto the new server. So here are my first impressions:

Continue reading Raspberry Pi to Banana Pi migration

Dynamic webcam control using (py)ephem

Time-dependent webcam control

For taking still images with a webcam looking outside my sleeping room window, I’ve attached a Logitech C510 to my RasPi. At first, I used the fswebcam program to acquire still images, which can be easily configured using a fswebcam.conf file as follows:

quiet device v4l2:/dev/video0
input 0
skip 50
palette MJPEG
background
resolution 1600x1200
set "White Balance Temperature, Auto"=1
set "Exposure, Auto"=3
set "Backlight Compensation"=1
#set "sharpness"=100
#set "gain"=0{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}
#set "exposure"=1
#set "brightness"=35{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}
#set "contrast"=10{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}
#set "saturation"=60
#set hue=10
#top-banner
#font /usr/share/fonts/truetype/msttcorefonts/arial.ttf
title "RasPi-Cam"
timestamp "{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}d-{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}m-{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}Y {c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}H:{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}M:{c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}S ({c7f7cb1468c0d02af358b3ce02b96b7aadc0ce32ccb53258bc8958c0e25c05c4}Z)"
jpeg 50
save /var/www/data/snaps/snap.jpg

Some settings required careful tweaking, since most webcams are optimized for indoor use. Although the settings above resulted in pictures of reasonable quality, I noticed that they were pretty much overexposed on bright sunny days. And they were far too dark at night. It turned out that the auto exposure function of my webcam is unable to deal with changing light conditions.

Therefore I did some research on how to change the settings dynamically, depending on time of day. It turned out to be a simple task using some python scripting.

A simple cabinet for the LiPo Rider Pro

As reported here, I recently purchased a LiPo Rider Pro in order to charge my gadgets while I’m outdoor. I’ve connected a 2000 mAh LiPo battery and a 3W solar panel. Since the LiPo Rider Pro Board was delivered without a housing, I placed the board into a small box for protection during transport. However, the USB ports and the test button were not accessible anymore and the charge/ok status LEDs were not visible.

Therefore, I decided to build a “sandwich” structure around it, just placing two acrylic glass pieces onto top and bottom of the board.

Continue reading A simple cabinet for the LiPo Rider Pro