Archive

February 14th, 2013

Changing Environs in Metal

Catherine’s show, Changing Environs, has been open at the Confederation Centre Art Gallery since the beginning of the month; it’s really quite wonderful, and one of the highpoints of my day is wandering through the Centre lobby on the way to or from coffee and seeing something I didn’t see before (can there be any greater gift from a love than the opportuntity to see into their soul through their art?). 

The “official opening” (where there’s wine and cheese and talk of “conceptual intentionality”) is coming up on February 24, 2013 at 3:00 p.m. at the Centre, and you are all heartily invited (Catherine’s parents will be here, and they live in Ontario!). I started work – late, admitedly, but better than never – on the invitation for the opening; it will be printed in two colours on my letterpress, and here’s the black set up and almost ready to print:

Changing Environs Invitation Typeset

I hope to have these printed and off into the hands of patrons of the arts Friday or Monday.

Den Tweet som utløste

So remember that tweet from the Public Library Service here in Prince Edward Island? The one that ended up with me depriving the citizens of PEI of the resources needed to learn Norwegian?

Library Tweet

Well, Dan Misener, personable producer of CBC Radio One’s Spark, read the post about my travails and invited me into the studio this morning to talk with host Nora Young about the crazy system we have for library lending of digital things that’s mirrored on the sensible system for library lending physical things.

Listen for it as the “compelling personal anecdote” behind broader Spark discussion of this issue on an upcoming episode.

February 13th

A Little More Temperature, a Little More Humidity

Following on from yesterday’s experiments with an Arduino, a DHT22 temperature and humidity sensor, some Python and Cosm, a few developments.

First, I generalized and cleaned up the Python code and companion Arduino sketch, and you can now find these both, with some documentation, in a Github repository. This code improves error detection, and filters out the occasional out-of-range reading (like a 2300ºC temperature). It also sends the data to both Cosm and to Thingspeak.

Second, I brought my Belkin WeMo Switch into the office with hopes of wiring it up to this system: the Venta humidifier in the office doesn’t have a humidistat in it, only three fan speeds; I’m thinking that I should be able to set thresholds for turning it on, like “if the humidity is below 25% and it’s after 7:00 a.m., then turn on the humidifer.” Stay tuned for that.

Third, in Safari on my Mac I opened the Cosm feed for the temperature and humidity and the selected File | Open in Dashboard… from the menu.

Safari Open in Dashboard

I then selected the orange temperature “badge” from the page, and clicked Add and then did the same thing for the humidity badge:

Open in Dashboard

The result is that on my Mac OS X Dashboard I now have the temperature and humidity in the office displayed:

February 11th

How's the weather in there? Using a DHT22 and an Arduino to find out.

Regular readers will know of my interest in (obsession with?) the temperature and humidity here in the office. Today I took this to a whole new level with this:

DHT22 Wired to Arduino

That’s an Arduino wired up to a DHT22 temperature and humidity sensor ($9.95 from The Robot Shop).

Using the wiring diagram helpfully provided by Adafruit I connected the DHT22 to the Arduino, with data flowing in on pin #7.

Next I installed this DHT library for Arduino and then used this slightly adapted Arduino sketch to actually grab the data:

#include <dht.h>

dht DHT;

#define DHT11_PIN 4
#define DHT22_PIN 7

void setup()
{
  Serial.begin(115200);
}

void loop()
{
  int chk = DHT.read22(DHT22_PIN);
  Serial.print(DHT.humidity, 1);
  Serial.print("\t");
  Serial.println(DHT.temperature, 1);

  delay(2000);
}

It took a little bit of fiddling to get things to work – it turns out that I’d used the wrong resistor to bridge the data pin with the 5V pin – but once it was working, monitoring the virtual serial port on my Macbook displayed the current humidity and temperature every 2 seconds:

34.2     22.7
34.1     22.7

and so on.

Finally, to pipe this through to Cosm and the world, I set up this Python script to run in the background on my Mac (adapted from here; I needed to install python-eeml and pySerial first):

import eeml
import eeml.datastream
import eeml.unit
import serial
import time

# parameters
API_KEY = 'MY API KEY'
API_URL = '/v2/feeds/104026.xml'

arduino = serial.Serial('/dev/tty.usbserial-A6008jtr', 115200)

while 1:
    readings = arduino.readline().strip().split('\t')
    pac = eeml.datastream.Cosm(API_URL, API_KEY)
    pac.update([eeml.Data(0, readings[1], unit=eeml.unit.Celsius()), 
        eeml.Data(1, readings[0], unit=eeml.unit.RH())])
    pac.put()
    time.sleep(60)

The result is this Cosm feed, showing temperature and humidity for the office:

Reinventorium Temperature

Reinventorium Humidity

The old analog gauge in the office agrees with the DHT22 measurement almost exactly; the humidty on the analog gauge reads about 6% higher:

Analog Humidistat

I’d like this setup to be less dependent on the intermediate MacBook (it makes the MacBook far less portable, for one thing), so my next step will be to adapt the setup to either use the Raspberry Pi to gather and forward the data, or to get an Ethernet shield for the Arduino so that it can hand this by itself.

Queens Square in OpenStreetMap

I decided that it was only right, given the work I’ve been doing with OpenStreetMap on the UPEI campus, that I should revisit the neighbourhoods closer to home too. Given that my life is lived, in large part, around Queens Square in downtown Charlottetown – office on one end, home on the other – that seemed like a good place to start. So, over the last few days, I’ve been fleshing out details, to the point where things look like this now:

Queens Square in OpenStreetMap

I added all the foot paths through the square, made some adjustments to the setup of the Confederation Centre of the Arts so that its footprint is clearer, and added monuments and fountains. You can take a look for yourself (and join in the effort – just click Edit) at OpenStreetMap.org.