Tag Archives: Adafruit

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 the new server