Tag Archives: temperature

I've run into a situation where I need to be able to read a temperature with my Beaglebone Black (I really don't care about humidity).  After setting up the sensor on my Rpi, a few have emailed me and asked about doing the same for a BBB, and I haven't had much by way of response.  The file that I previously used didn't work on a BBB.

On the Beaglebone Black, there are a few preparation items that must be completed:

1: Make sure you have Internet connectivity (I had to add DNS servers to /etc/resolv.conf)

2: Go to Derek Molloy's blog and follow step 3 under "Fixing SSL Problems with Curl"

3: Make sure Python and some Python tools are installed:

opkg install python
opkg install python-pip python-setuptools python-smbus python-misc

4: Install the Adafruit BBIO Python tools:

pip install Adafruit_BBIO

5: Follow LadyAda's steps to install

At this point, you can connect the sensor, make sure to use SYS_5V (P9 7 or 8) and not VDD_5V.

2014-10-28 21.09.56

Pin 1 on the sensor is connected to P9_7, pin 2 has a 10K pullup resistor and is connected to P9_11, pin 3 is connected to P9_1.

At this point, you can go into the examples and it should work... in Centigrade:

Screenshot 2014-10-28 21.12.27

 

...which is great for those of you that use that standard, but in America we use Fahrenheit, which is a pretty simple code change that you can see in my fork on Github.

So now...

Screenshot 2014-10-28 21.32.39

At this point, a mix of Python and Cron would make this able to send data to ThingSpeak, Xively, Phant, or any of the other IOT logging services (which may become a future blog post).

-73-

PS: for full disclosure, I'm looking at this because I've been brewing beer and I'd like to THINK my basement temperature is under control, but with temperatures possibly starting to fall in my area I'd like to keep a better eye on it. 🙂


Category: Beaglebone

This is a continuation of my last blog post about having my Raspberry Pi log temperatures in my basement.

In the last blog post, I noticed some problems using Node.JS due to some caching issues.  Today I found the answer to my problems: Cosm.com.

After some adjustments to my code, I started seeing some pretty cool graphs on Cosm's website.

So this seems like the right thing to use for this.

The link to all the data is here.

The modified shell script:

-73-


Category: Raspberry Pi

I am trying to have a green thumb. Right now, it is more of a pale yellow with a hint of orange. One thing I thought about doing was a temperature logger for plants that I'm starting and will be transplanted outside in mid-April, after the frost season ends in this area.

I initially thought about using an Arduino, but connecting the Arduino to my network would have required me to buy an Ethernet shield or a Wifi shield, both of which are quite expensive.  I happen to have a USB wifi adapter hanging around and a Raspberry Pi that wasn't being used.  Match made in heaven!

So the first thing I did was go search around on the Internet and found something from Adafruit that included source code and a hookup diagram for a DHT22 temperature and humidity sensor. Mine is an RHT03, which is similar.

2013-02-24 01.50.10

I did find that my RHT03 does not run with 3.3v, so I changed the power rail to 5V, and viola!

The next thing I looked at was the source code.  I made one minor change and recompiled - I edited everywhere where I saw temperature in Centigrade and changed it to Fahrenheit.

rpiTemp

So the next step was to make it easy to get to.  I don't want to log in to my Raspberry Pi via SSH terminal just to check the temperature.  So I decided that it seems Node.JS is the way to go because I can very easily write a web server for it.

nodeTemp

Nice and simple.  And of course, the code:

-73-

UPDATE: I've had this running a few days, and realized that it seems Node.js does not like to update as fast as I would like.  In fact, it doesn't update until I restart the server... not sure what to do about that, but it drastically limits the usefulness of that tool as a solution in this situation.


Category: Raspberry Pi
http://www.ke8p.us/feed/ http://twitter.com/ke8p

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



This is the new server