Beehive Instrumentation Project-4: Adafruit HTU21D-F Temperature-Humidity Sensor Breakout Test

Among the most important things we want to monitor from beehives are temperature and humidity in the hives.  For convenience, I chose Adafruit’s breakout board for the HTU21D-F chip.

htu21d-f

To test the sensor, I used code posted by Davespice:

https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=76688

Here is a sample of the output over SSH:

Rpi HTU21D-F ouput 2

Looks like the corner of to upstairs room is a bit warm.  Relative humidity started about 33%, and rose to 41% when I exhaled onto the sensor.

Beehive Instrumentation Project-3: Apache Server, Python in PHP

While running the Raspberry Pi 2-B off the drill battery, I installed the Apache-2 server and MySQL.

See http://elinux.org/RPi_Apache2 for details.

I want to run the temperature and humidity logging, IR and USB cameras, and other possible instruments like weight measurement from a local web server on the remote RPi.  The first step is to run a PHP script on the server, which in turn selects the “driver” code for the attached devices.  The learning PHP script runs a simple Python script.

See http://stackoverflow.com/questions/19735250/running-a-python-script-from-php for the basic ideas.

I wrote the PHP script “index.php”, which is place in the RPi directory /var/www, where the Apache server runs it as the default start up code instead of index.html.

<?php
echo “hello world.”;
echo “<br>”;
$command = escapeshellcmd(‘python test2.py’);
$output = shell_exec($command);
echo $output;
echo “<br> I’m here in php”;
?>

The Python script “test2.py”:

#!/usr/bin/env python
print “I’m here in Python”

When the IP address of the RPi is entered into the Firefox browser, this is the result:

RPi2B server Firefox browser image

RPi2B server Firefox browser image

Beehive Instrumentation Project-2: Raspberry Pi 2 on 18V Drill battery power

RPi 2 with 18V drill battery power.

RPi 2 with 18V drill battery power.

Last post, I checked out the UBEC as a DC-DC converter to power the Raspberry Pi 2-B from a Ryobi 18 V tool battery.  This time, I actually plugged the RPi into the battery power.  I attached the 5V output leads to a USB socket so the RPi could be powered through the micro USB connector for additional protection.

So far, I have operated the RPi2 from the battery for over 8 hours, including working on the Apache server (see later) over SSH, and an HDMI connection to a TV part of the time.  Battery open-circuit voltage dropped from ~22V to 17.35V.  Looks promising so far.  I’m planning a battery monitor using one of the channels of the MCP3008 analog-digital converter for a more accurate measurement of power status.

Beehive Instrumentation Project-1: 18V Drill battery power for Raspberry Pi 2

Test of UBEC (Adafruit#1385) connected to 18V Li. Using obsolete NiMh charger case for battery connector- there’s room for RPi2 in there.

Will need to source parts, rather than using salvage.  Checkout with the Raspberry Pi 2 next.

Testing Adafruit UBEC with 18V Li drill battery.

Testing Adafruit UBEC with 18V Li drill battery.

Somewhat later, using HootSuite on Twitt

Somewhat later, using HootSuite on Twitter, etc. again.

2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

The London Olympic Stadium is 53 meters high. This blog had about 580 visitors in 2012. If every visitor were a meter, this blog would be 11 times taller than the Olympic Stadium – not too shabby.

Click here to see the complete report.

“Understanding Creation” on SU

1 Corinthians 1:22-25
22Jews demand miraculous signs and Greeks look for wisdom, 23 but we preach Christ crucified: a stumbling block to Jews and foolishness to Gentiles, 24 but to those whom God has called, both Jews and Greeks, Christ the power of God and the wisdom of God. 25 For the foolishness of God is wiser than man’s wisdom, and the weakness of God is stronger than man’s strength.

Now we have groups with different names, but mostly the same misunderstandings. Adherents of Science want the Universe to be a somewhat limited puzzle, ultimately explicable by some combination of mathematics (including statistics), physics, and the heroic exertion of personal intellect. In Religion, on the other hand, some practitioners insist that God perform as required whenever the correct ceremonial affectations are presented. Others demand that His Universe must be a static diorama of the creations of a fully comprehensible God.
But the Universe was not designed for the convenience of human understanding. Creation is the work of a Mind beyond anything we can know how to ask about or even imagine (Ephesians 3:20-21)!
This is a boundless mystery of wonders to be explored, but we have to know where to look (James 1:5).

Danger Living Room: Dinner Time

America got to the table even later than usual. He had actually done this on purpose, hoping to miss the tiresome “blessing” that Dad always made them say before meals. He was dismayed to find Dad still bowed, speaking the blessing aloud. As usual, Dad was being drowned out by the din of the dinner table.
The older children were all complaining loudly about China. China had found some books on magic tricks and gambling. Many of the others now claimed he had cheated them out of all their allowance money.
Iran sulked at the far end of the table, picking at his food. Before too long, he gave up the pretense of eating, and started playing with his growing collection of plastic motor boats. Several of the other children called for Dad to put a stop to this, since Iran was supposed to be passing the gravy.
It would have done little good for Dad to intervene in any case. It was a very large table, and by the time anything Dad said was relayed to the other end, the messages passed from child to child would have borne little resemblance to what he actually said. Worse, some of the naughtier children would entertain themselves by making up things to add, or change the pronouncement completely.
Russia amused himself by slipping a handful of strike-anywhere matches he had found in the garage to Iran under the table. For good measure, Russia had dipped the heads in one of Dad’s gas cans.
Iran thought this was a great idea, and now busied himself with setting fire to the table cloth. Although this would presumably have threatened Iran before anyone else at the table, he convinced himself that it would get Dad’s attention, and felt absolutely sure Dad would move to his end of the table if he made a big enough scene.
Dad ended his mostly fruitless attempt to conduct the “blessing”. He abruptly rose from the table and walked out of the living room, even though he hadn’t touched his food. A few of the smaller children later said they thought they saw tears welling up in Dad’s eyes. America and some of the older children sneered at this, and assured everyone that Dad was never at the table to begin with. This mystified the other children, since America was sitting right next to Dad at the table.
Before long, everyone got bored with spitting, cussing, throwing food, and pulling each others’ hair, and started to get up from the table. Just as they started to move, however, Iran and his plate and toys were suddenly engulfed in flame! Other children frantically doused Iran and the table with their water glasses, and got the flames out before too much damage was done. Russia and China laughed so hard they nearly fell out of their chairs. America, Britain, France, and several of the children at the other end of the table started to scold them, but only halfheartedly. Clearly everyone was enjoying the silly spectacle, and they didn’t want to become unpopular.
Eventually the excitement wore down. Somebody handed Iran a couple of ice cubes for his burned fingers, and everyone went outside to play.

To Be Continued….

RT @samaritanspurse: Today is Independen

RT @samaritanspurse: Today is Independence Day in South #Sudan! “It will be a day of freedom, justice, and peace.” http://ar.gy/TYL

RT @ap:Casey Anthony may be released fro

RT @ap:Casey Anthony may be released from jail in late July or early August. #breakingnews |No, that’s>your<criminal justice system.