Andrew Que Sites list Photos
Projects Contact


   As a gift to those who participated in his wedding, Pluvius gave his groomsmen a Raspberry Pi.  I don't have a project in mind right now for this device, but decided to get it setup.  Doesn't take long to install an OS, and I soon had the device running with an SSH connection.  I've named the device ππ.  I decided to install a LAMP server just to see how it worked and soon the device was able to host web pages.  Mostly because I can, I've made the server public at  There isn't anything on the server, but that may change.

1 comment has been made.

From N

June 12, 2014 at 11:16 AM

Looks cool - I'll be very interested to see any future projects you use the Pi for!

   Now that I have all the parts I need, I decided to do some work on ππ.  Soldering took longer to gather all the pieces than to actually put on the connector.  I quick look at the pin out and I had the digital luminosity sensor connected to the Raspberry Pi.  Programming was a little more tricky.  The documentation for the device wasn't great, and the example code was written for an Arduino but a Raspberry Pi.  However, it didn't take too long to figure out how Linux deals with the I2C bus (guess what?  It's a file!).  Looking at some example code I was able to reverse engineer it so I could setup and poll the device.  Soon I had numbers on the screen that reacted to light.  And after more work I had them in the units of Lux using the example code's conversion function.  I used their function because I assumed they verified the math was correct.  I have nothing to use as a calibration test, so I didn't want to change anything I don't need to.
   After getting the input, it was time to log the data.  I setup my program to sample as fast as the device would obtain the data and average those results over a minute.  Each minute the data is saved to a CSV file.  This will allow me to see what kind of light I can reasonably expect from a location I plan to place a solar panel.  Knowing how much light is available will allow me to select a solar panel of sufficient size to power ππ.
   Yesterday I got the software working so ππ can log Lux over time.  Not it is time to make ππ ready to live on the roof.  I'm bad mechanically, but after talking with Xiphos some I came up with a mounting plan that should work.  ππ will go into a plastic container.  The sensor is mounted to a microscope slide using a twist tie I super-glued to the slide.  The Raspberry Pi is suspended inside a plastic container by two screws I happen to find that were small enough to get into the mounting holes.  A cut a hole into the plastic container so I could mount the slide on it, and then covered the top with caulk.  This should prevent water from coming into the housing.  I plan to leave the bottom open so air can blow past, allowing the device to stay cool (I hope).
   Pictured is the Raspberry Pi and the sensor mounted to the housing.  Once the caulk is dry I can move the computer into the housing.

July 04, 2014

Operation Lux Begins

   With the housing complete and the caulk dry it was time to mount ππ on the roof.  To do this I used a scrap board and put four screws on it for feet.  The points of the screws will sink into the roof a bit to provide anchorage without going through the shingles.  A brick on this should provide enough weight the setup won't move.  Now I just needed power.  Our house has no outlets on the outside of the house, or even in the garage.  We have wanted power in the garage for a long time so I ran a feed of wire through an existing hole and put in a ground fault interrupted (GFI) outlet in the garage.  From there I ran an extension cord out a window and to the experiment on the roof.  With the additional wireless router upstairs I had no trouble getting an wireless network connection.  The experiment began to log data right away and now we just have to wait for data.