Notes » 2008

The process of getting Flash to communicate with an Arduino on Linux (specifically Ubuntu 8.04) seems to be poorly documented. The basic steps are as follows:

  1. Download, compile and install serproxy using the whole make, make install rigmarole. Serproxy will be installed by default in /usr/local/bin.

  2. Configure serproxy appropriately by copying the sample serdata.cfg file to the /etc directory and editing the requisite information.

    • Ensure serproxy uses the same baud setting as the Firmata firmware, which by default is 57600.

    • Also, serproxy does not seem to give an option for the USB port (/dev/ttyUSB0) that an Arduino Diecimila connects through on Ubuntu. A symlink from /dev/ttyUSB0 to /dev/ttyS2 (which is COM3 as far as serproxy is concerned) should do the trick. Any other unused serial port will probably also work.

  3. Install Firmata for protocol version 1.0 on the Arduino board using the Arduino software.

  4. Use the Glue Actionscript 3.0 library to communicate with the Firmata firmware on the Arduino via a running instance of serproxy. Unfortunately, Glue does not seem terribly well-documented, but the source code is readable enough. This is a quick-and-dirty sample app that turns on and off an LED connected to pin 13 when the mouse button is clicked:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package
{
  import net.eriksjodin.arduino.Arduino;
  import flash.display.Sprite;
  import flash.events.MouseEvent;
  import flash.events.Event;
 
  public class ArduinoTest extends Sprite
  {
    public static const LED_PIN:int = 13;
    private var arduino:Arduino;
    private var ledOn:Boolean = false;
 
    public function ArduinoTest()
    {
      arduino = new Arduino( "127.0.0.1", 5331 );
      arduino.addEventListener( Event.CONNECT, handleSocketConnect );
    }
 
    public function handleSocketConnect( event:Event ):void
    {
      trace( "Arduino socket connected!" );
      arduino.setPinMode( LED_PIN, Arduino.OUTPUT );
      stage.addEventListener( MouseEvent.MOUSE_UP, handleMouseUp );
    }
 
    private function handleMouseUp( event:MouseEvent ):void
    {
      if( ledOn ) {
        trace( "Light off!" );
        arduino.writeDigitalPin( LED_PIN, Arduino.LOW );
        ledOn = false;
      }
      else {
        trace( "Light off!" );
        arduino.writeDigitalPin( LED_PIN, Arduino.HIGH );
        ledOn = true;
      }
    }
  }
}

Et, voila!

One of the more notable problems with digital artifacts, besides their ephemeral and intangible nature, is that they tend to lack character. They are produced by machines and they are readily reproducible by other machines without marginal additional effort. They lack the individuality and imperfection that comes from something that was manufactured not as we come to think of it now, but in the original sense of the word — to be made (factured) by hand. Even as something as simple as a handwritten note on a scrap piece of paper has more character than anything made by machine.

At the Experience Music Project in Seattle, there is a Jimi Hendrix exhibit. And in this exhibit there are large posters of the lyrics to a few of Hendrix’s songs, blown-up photographs of scrawled handwritten notes Hendrix made on spare bits of hotel stationery from wherever he happened to be staying at the time. To see the lyrics, in Hendrix’s own handwriting, on stationery that places that single creative moment in both in geographical and chronological space … well that’s something that could just never happen if Hendrix had typed those same lyrics into the notepad application on his laptop computer. All the preserved emotion and individuality and character and authenticity of the scrawling Hendrix handwriting would have been lost. The creases in the paper, the subtle stains of age and even the contextual markers of the stationery logo and address — those would’ve been lost as well. In fact, a great deal of the visceral emotional power of the entire exhibit would have been completely and utterly … absent.

One could ask: What would Jimi Hendrix have become had he been born in the 1992 instead of 1942? How would his music have changed if aided by digital tools? These are, however, meaningless questions. People are creations of their environments, and Hendrix was who he was because of when he was.

A more appropriate question may be: How does creativity change when more and more of it is facilitated by machine? What happens when something as simple as song lyrics are typed out and stored in a digital file instead of handwritten on a physical sheet of paper? When the emotion conveyed by the irregular strokes of a pen is replaced by the uniform neatness of the Helvetica font, what changes? The answer can only be: everything.

In the realm of creative expression one thing is apparent: Tools are tools, and all of them have inherent limitations, even machines. The personal computer is limiting not only because of its regimented, digital nature, but also because of its sedentary interaction pattern. Humans beings are embodied creatures, and sedentism is rarely conducive to creativity. Creativity comes not just from the mind acting through the fingers, but from the whole being. And creativity should be preserved in media that maintains the full fidelity of what that embodied experience is all about. Or — at the very least — more of that fidelity.

Note: The irony that all of this is being published in digital is not lost on me.

The girlfriend is nearly 5 years older than me, but most people think that she is about the same age or younger. I think that this is a good thing. She disagrees. But certainly there are distinct advantages to being mistaken for a younger individual once you’ve hit your late twenties and thirties … excessive “carding” notwithstanding. As valid anecdotal proof of this, I thought it prudent to republish the following parable, something I wrote about 3 years ago:

The doorbell at my house is old, but constructed with astonishing precision so that every time it rings it does so with such fervor and resonance it’s little wonder that the adjacent windows don’t shatter instantly. A few days ago I was in the kitchen staring, mouth agape, at the assortment of goods in the pantry, trying to find something to eat, when the doorbell rang. As I wasn’t expecting anyone at the time, I couldn’t shout my usual “It’s open!” but instead had to amble over to the entryway to see who happened to be the perpetrator of the racket. Sometimes I just want to crack the door open, poke my head out, and yell “Who rang that bell?” like the doorman of the Emerald City in the Wizard of Oz, but one never knows how safe that kind of maneuver is. You can crush your head or your nose or smash a finger doing something stupid like that. Instead, neglecting the peephole, I just swung the door wide open.

I was greeted by a short, scruffy looking-man in a plain white T-shirt and jeans. As he was unaccompanied and dressed rather sloppily, I quickly realized that he was neither a Jehovah’s Witness nor a follower of Joseph Smith and Brigham Young. My whole “Sorry, but I’m Jewish” bit would have to wait another day. No, this man was either at my door to rob me at gunpoint or sell me magazine subscriptions, but at first glance I couldn’t tell which. A good friend of mine, who is somewhat irrationally afraid of what she calls “bad guys” – you know, those nameless specters that lurk around every corner – probably would have opted for the former. But I, in my ever-present optimism, chose the latter.

Anticipating how best to turn down this man’s offers, even in the face of sob-stories about drug abuse, starving children in Ethiopia or outright pleading, I quickly scanned my brain for viable excuses. But I was saved by the salesman himself.

“Are your parents home?” he asked.

Since I no longer live with my parents, I really had no idea if they were home or not. Perhaps they were. It was 2:00 in the afternoon on a Saturday, so there was a good chance that they were home. But they were not in my home, and realizing that this is what the man before me had implied, a grin spread across my face as I discovered that the excuse I’d been searching for had been delivered to me on a silver platter.

“No, I’m afraid not.”

“OK, I’ll try back later.” He slowly turned around and walked away.

I guess there are advantages to looking younger than you are.

Taken from Professor Simon Penny’s collection of sundry words of wisdom. Somehow it feels appropriate:

During the renovation of buildings for the ACE program, a man was sent to fix a problem with a door. When I encountered him he was enlarging a hole in a the door with a grinder so the lock would latch. I looked at the door and noted that that door was not latching because the screws holding the hinges to the door-frame had corroded and the door had dropped. I pointed this out to him, and suggested that he replace the screws in the hinges. He looked at me with pathetic incomprehension and said “I’m a lock guy, I’m not a door guy.” There is an appalling profundity in this response. It succinctly captures the kind of narrow thinking which ACE works against. In institutions of higher learning, emphasis is commonly placed on ‘problem solving’ as if problems were self-evidently lying about just waiting to be picked up. But in order to be solved, a problem must first be identified and framed. In the real world, problems seldom observe disciplinary borders. ‘Problem framing’ requires a kind of intellectual process which is diametrically opposed to ‘problem solving.’ It requires the ability to grapple with incongruities and incompatibilities and discontinuities. In my opinion, we are good at teaching the deductive processes of problem solving, but this only permits students to solve already framed ‘textbook’ problems. Self evidently, it is more important to ask the right question than to get the right answer. Except in isolated and informal pockets, we seem to be bad at teaching the process of asking the right question.

2 facts: 1) Serendipity is the engine that powers the wonder of life and 2) when you read, life is often measured in periods demarcated by the dates before and the dates after the reading of a life-altering book.

A life-altering book does not necessarily need to be a good book. It does not necessarily need to be a classic. In fact, informal surveys have shown me that it rarely is. Instead, the book simply needs to have the right message in the right format and arrive in the reader’s hands at exactly the right time. Hence, serendipity.

The books I have read that have had a profound impact on my life — either emotionally, intellectually or spiritually — have never been chosen by me. They fell into my hands as random gifts or chance recommendations by friends, family members and even perfect strangers. Choosing your own books, either at the bookstore or at the library, even when the choosing is done in a purely whimsical manner, too often results in a closed feedback loop. You will always choose books on subjects that you know already appeal to you, written by authors with a style you know you will like. This echo-chamber intellectual silo is unavoidable without third-party support, and Amazon.com’s recommendation engine does not count as third-party support. It knows what you like and will just continue showing you books that fall within your core sphere of preference.

What is needed is a serendipity engine. An engine for the engine, if you will. There are relatively low-tech versions of this. Bookcrossing being one example. And a good one at that. The best solutions will, of course, be completely unpredictable, both in content and timing. A program that knows your personal zeitgeist and then, at entirely random intervals, hands you something entirely outside the realm of said zeitgeist. In this sense, a monthly book club recommendation does not work. The book should fall into your hands when you least expect it at a time when you probably don’t want to read it. But then you read it anyway.

The Razor’s Edge was like this. So was Ishmael, Fahrenheit 451, Zen and the Art of Motorcycle Maintenance, and Randy Pausch’s The Last Lecture. In hindsight, it is obvious that there is certainly a common thread among all these books. Finding that thread is left as an exercise to the reader.

What would an Internet without language feel like?

In 1996 Dr. Jill Bolte Taylor suffered a stroke that temporarily eradicated nearly all of the mental functions that were controlled by the left hemisphere of her brain — deductive reasoning, language, pattern and symbol recognition, recognition of self, &c. Living for several weeks in a world without language, in a world without the ability to name or label things or judge things or give a damn about the details of life, she describes here experience as a Buddhist might describe a perpetual state of samadhi — pure and effortless bliss. Apparently — or one might jump to the conclusion — the key to Nirvana lies in the right-half of the brain.

Dan Pink thinks we live in a left-brain dominated world. He’s probably right. Or left. Never in its relatively brief history has the human species been so inundated language. From the Internet, to radio, to television, to iPods, to roadside billboards, to telephones, to text messages, to ads plastered on the sides of city buses, it is impossible to escape words. Nobody in the civilized world enjoys even the briefest luxury of linguistic silence. Rising stress levels and a complete lack of ability to focus (continuous partial attention, per chance) are just a few of the more prevalent results.

The Internet is perhaps one of the biggest culprits of the crime of language overload. But what if it could be amended with some type of linguistic filter? A silent web devoid of words, both written and spoken alike. An Internet of images, photos, video and instrumental music only. Google searches made possible only by uploading an image or photograph and finding similar results. How would the experience be different? How would the left hemisphere revolt? What would the whole thing feel like?

Gorging ourselves on a never-ending smörgåsbord of words, it’s sometimes easy to forget that the world is made of more than just mental constructions, and that a great deal of communication takes place outside the narrow bandwidth of language alone.

There is a hypothesis that says that the purpose of sleep is to reinforce certain memories, or rather, neural connections, that were created during the previous day. Sleep does this not in a way that one might expect — by actually strengthening the connections — but rather by subtly washing away the neural connections created during the day that are deemed trivial or unimportant. Leaving only the most important ones remaining. A bit like waves washing gently on a rocky beach over thousands of years — eventually most of the rocks are turned to sand and only the largest rocks remain.

When it comes to the preservation of culture, time, I think, works quite similarly. Take literature, for instance. Of the many millions of bodies of text that have been created over the thousands of years since man first invented writing, only a very few have been continually preserved and set aside as “classics.” The rest were beaten into sand and washed away by the ocean of time.

This isn’t a random process either. The Iliad or the Old Testament or Beowulf or Hamlet aren’t available to us today by mere fortunate happenstance. Society made great efforts to keep them in circulation and preserve them. If culture is like a brain distributed across a certain population, and time is its sleep, then these cultural works are the synapses that matter. Somehow. Even though when you read them in high school it doesn’t seem that way.

Will the Internet and digital storage media do away with this form of cultural sleep? If everything can be preserved, whether or not it is of significant cultural value, will it? Where then will classics come from? Or will culture break down into nervous chaos — where everything is of equal importance and so nothing is of importance at all — perhaps like the mind of a chronic insomniac?

Even in a digital world, preservation of information still requires time, money and resources, albeit small. Websites come and go. So do blogs. They are more ephemeral even than books. So, perhaps the reverse will be the case — that because we can preserve anything, we don’t produce anything worth preserving, and thus preserve nothing at all. Either way, in the future, the mechanisms by which culture evolves will almost surely be different.

I went into the woods to live deliberately … and returned from a week of solitary hiking, camping and meditation in the forests and on the beaches of Big Sur. Forest fires and incessant showers of ash did not keep me away, but Los Angeles traffic threatened to. It is an interesting test of courage and mettle to walk into the woods by oneself, with nothing but a few liters of water and other odd provisions stored away in a backpack. But it’s an even more interesting test to sit down once one gets in there — deep in the thick of those giant redwood groves — and do absolutely nothing but observe. As I once read on the scrolling vertical marquee of red LEDs outside the San Diego Museum of Contemporary Art: “At times, inactivity is preferable to mindless functioning.” So it is.

Certain complexities arise only because people have something they are trying to sell. Or, perhaps they arise for other, less insidious reasons, but linger and proliferate as a result of that first postulate.

Take HTML e-mail, for instance. I spent the better part of an afternoon trying to craft an HTML e-mail that works in multiple clients. Yet, I do not receive HTML e-mail from anyone except from those who are either trying to sell me something or from those few friends and family members who think it’s fun to use “cutesy fonts.” The former need to find another medium and the latter just need to not be given the option. Perhaps I sound a bit like Andy Rooney, but HTML e-mail needs to go away. E-mail is for communication, and if the person communicating can’t deliver his or her message in plain text only, then either he or she needs to learn to write better, or if visual communication is absolutely necessary, include an appropriate diagram as an attachment. Don’t make me involuntarily download your bloat.

Also, you kids need to get off my damn lawn.

If you are riding on a train or a bus or similar conveyance, it is best to face backwards, so that you can watch the passing landscape and all its myriad details recede behind you. It is a completely different experience from facing forwards, which gives the impression that everything is coming at you, when in fact the situation is just the reverse. To watch the world fall away, growing smaller and smaller in the distance, reminds you how transient the entire situation really is.

Also, more from Walden, “Where I Lived and What I Lived For”:

Little is to be expected of that day, if it can be called a day, to which we are not awakened by our Genius, but by the mechanical nudgings of some servitor, are not awakened by our own newly acquired force and aspirations from within, accompanied by the undulations of celestial music, instead of factory bells, and a fragrance filling the air — to a higher life than we fell asleep from … We must learn to reawaken and keep ourselves awake, not by mechanical aids, but by an infinite expectation of the dawn, which does not forsake us in our soundest sleep. I know of no more encouraging fact than the unquestionable ability of man to elevate his life by a conscious endeavor. It is something to be able to paint a particular picture, or to carve a statue, and so to make a few objects beautiful; but it is far more glorious to carve and paint the very atmosphere and medium through which we look, which morally we can do. To affect the quality of the day, that is the highest of arts.