Languages

The spirit is in the house

Louise, an australian artist in residency at ComPeung, has invited me to contribute to one of her works, a genuine spirit house (see this post for more details about these).

I had this idea of building a simple circuit that would display some sort of autopoiesis, a looping reference to itself. I thus built a simple circuit consisting of an LED and a photoresistor. The circuit follows the following simple, autorefering algorithm:

loop:
x = lightValue() (1)
setLedValue(1 - x) (2)
delay() (3)

(1) value of light as read by photoresistor, normalized and remapped to [0, 1]
(2) set LED value to the opposite of perceived light
(3) wait for some time

Normalization of the light values is done by computing a moving average of both the mean and the sum of squares (in order to estimate variance). The result of this is a simple, natural flickering at equilibrium point. Changes in surrounding light momentarily break equilibrium until the device is able to provide accurate normalizations according to the new distribution of light.

I still have an unidentified problem with the code that started showing on the day of the blessing of the spirit house. Never had the problem before. After some time, the LED just turns off and doesn't come back to life. I first thought it was a hardware problem, but it was software. I thus had to add a hack to the code.

It might as well be the spirit fooling around.

We held the ceremony on Friday around 4 p.m. The brahma asked us to cook a whole chicken on a BBQ stove near the house, so that the spirit can smell it. We also gave whisky, fruits, incense and candles offerings.