Video Installation

Last summer Ray Chi got in touch with me about an installation he was doing for the Milwaukee Art Museum. He wanted a video screen that could be activated to play a video by touching a metal plate. Well, actually six videos and six video screens and six metal plates.

I told him I’d figure out how to get it all to work the way he wanted. I came up with a few ideas, one of which was using Processing, which I did get working, but at the time Processing wasn’t really running on the Raspberry Pi, at least not officially (or very well) and since the Pi was what we ended up choosing, I needed another solution.

For an installation that’s going to be running for years, simplicity and reliability are key. I had used Pis in the past many times for video players using omxplayer. Typically I’d just launch omxplayer on boot and have it play a video, looping, forever. For this application we wanted the video to play only when the metal plate was touched by a human hand (and then stop playing when someone stopped touching it) which meant capacitive touch.

Rather than spend a lot of time coming up with something that might work, I went with something that I was 98% sure would work. I used Adafruit’s Standalone Momentary Capacitive Touch Sensor Breakout attached to a Teensy LC. Why a Teensy LC? Because it’s a low-cost (LC!) Arduino-compatible microcontroller and it can emulate a keyboard.

Yes, a keyboard! If you have a USB keyboard connected to a Raspberry Pi computer while omxplayer is playing a video, you can just hit the space bar to play the video, and then hit it again to pause the video. Those are the two things we needed to do.

Video Player Controls

So, Raspberry Pi, running omxplayer to play the video, with a Teensy LC attached programmed to work as a USB keyboard, and triggered by a capacitive touch sensor, which was then connected to the metal plate. Simple!

There was this issue of……. timing.

So in theory, the Teensy would just need to send a space character to play the video, and it would do this when you touched the metal plate. But! (And it’s a Big But) the issue was that we wanted the video to start playing at boot and then pause at the beginning and sit there waiting… for someone to touch the metal to start the video playing. Rather than fire up the video via the typical Linux methods, we ended up just starting up the Pis, auto-logging in, and having them wait at the command line… yes, just sit their waiting, doing nothing… Sort of.

When the Pi booted up, it provided power to the Teensy, which then started running its sketch. The sketch would start at boot, wait 45 seconds to ensure the Pi was booted up and sitting there waiting at the command line, and then it would type:

/bin/bash /boot/video.sh

So we actually used the Teensy to send the text to the Pi (just as if a human typed it) which then fired up the script and started the video playing. The sketch would then wait 2.4 seconds and type a space character, which would pause the video. This set the state of things exactly where we wanted them. The video way paused, just waiting for the next command from the Teensy, which was… space, of course!

Now, there’s the concept of “rising edge” and “falling edge” when it comes to pressing buttons. A rising edge is the transition from low to high, and a falling edge is the transition from high to low. That’s a fancy way of saying we can tell when the button is being pressed, and when it’s being released. It’s best to use debouncing for this, and there’s a library for that.

Video Players Mounted

So with everything mounted in place we still had to deal with one issue. The HDMI displays worked find as long as they were turned on before the Raspberry Pi computers. If they were turned on at the same time the resolution wouldn’t set right, and the video would be letter-boxed. There were two options, one would be using two different power strips to get power to everything, with instructions for museum staff to follow a specific order. This wasn’t ideal, so we went with option two. I used a time delay relay so that one single power strip could be turned on, which would turn on the HDMI displays, and then a few seconds later turn on the computers. It worked. (And yes, I found out later I probably could have fixed the issue in software. Duly noted.)

Are there things we could have done better? Yes. Did we get the project done on time, and within (or under) budget? Yes. Was it fun and challenging? Yes and Yes. You may read this and think “Hey, you totally could have solved problem X by doing Y!” and you’d probably be right. I’ve found a number of things I’d do slightly differently if I were to do something like this again. That’s all part of experience, and learning, and sharing… right?

Video Player

When the installation was all done and tested, I got photos of everything, and then set to work on documenting it all. I delivered a 14 page manual on the construction and operation of the video players, along with the code and instructions on how to use one of the backup SD cards that was prepared in case of failure.

Besides, now I can (sort of) say that my work is in the Milwaukee Art Museum. ;)

Spotlight

Typically if I need to find a file while my Mac is connected to a network volume, I can easily search that volume using the Finder. This usually works well, and I can find what I need. This doesn’t work at all for the Windows shares I have to use at work.

It’s a full-on Windows environment at work, and everyone has a Windows machine on their desk. I’m the only one who uses a Mac as their primary computer. I do all my own support, which is fine. I just have to find my own workarounds sometimes.

ls -laR

Since I often have to look through one of the Windows shares for old files, I’m stuck browsing since I cannot search, so I originally went into the terminal and did a ls -laR and dumped it to a file so I could easily search for specific files. This sort of worked, but since the listing via ls lists the directory and then all the files in the directory, I had to look at more than a single line of text to find the path to the file I wanted.

find $PWD

I then found the power of combining find with $PWD for find $PWD. This allowed me to list every single file on the Windows share, and dump it all to a file (which is 18MB) that I can easily grep in about a second.

The file’s information isn’t real-time, but I’m typically not looking for new files, but old files that someone else created years ago. I can always refresh my local store every week or so.

If I need to find every Arduino sketch, it’s now as easy as egrep -i '\.ino' ~/WindowsShare.txt

The Artist

The Artist has died. The Artist created Art, and gave it to the world, and we still have that Art, but the Artist is gone.

I don’t find jokes about how Artists are worth more dead than alive amusing. Artists contribute to our world in many ways, and while it’s easy to ridicule those who pursue degrees in the Arts, I ask you instead to consider the impact Art has had on your own life.

Artists are performers, actors, musicians, singers, writers, educators, photographers, chefs, directors, designers, filmmakers, inventors, entrepreneurs, and above all, people.

If you’ve enjoyed a movie, or an album, or a book, or a delicious meal, or learning, you may need to thank an Artist.

If you haven’t died because of poorly communicated warnings, or signage that prevented you from danger, you may need to thank an Artist.

Artists create work that makes us happy, and sad, and makes us feel something. Artists create work that people enjoy, that changes lives, that saves lives.

We all contribute to this world in our own way. Nearly all of the Artists I know try to contribute to this world in a positive way. Most of them art not motivated by greed or power, but by the desire to create and share with others.

The world needs more Artists.

KIS

I’ve been thinking about this triangle consisting of three elements: Knowledge, Ideas, and Skills, and how people have these three things.

Knowledge is the things that you learn. The bits of data that you collect over the years, either from reading, or experience, or just taking in the world around you.

Skills involve actually doing things. Building things, writing code, designing stuff. Going beyond theories and ideas to create.

Ideas are what you bring to the table. Your own thoughts and dreams, as it were. The spark that ignites the creation of something.

Ideally you’d want to be right in the center, and be equally strong with Knowledge, Ideas, and Skills. Though perhaps as you exist in the center your strength at each one diminishes. Perhaps there are the rare individuals who can excel at all three, but in thinking about people I know (and myself) it’s probably more likely that people hit one or two of them strongly, and a third not as much.

I used to know a guy who was a phenomenal guitar player. His technical skills were amazing, and his knowledge was up there, he knew tons of songs and could play them perfectly. Sadly, his ideas were lacking, and he wasn’t much of a songwriter. Luckily he was in a band (a team) where others could provide the ideas. This is what teams should do, right? Bring together members with different strengths to create something better than what just one person can do.

In my own work (and play) knowledge is something I’m always chasing after. I spend a lot of time reading, and occasionally I ask questions. I tend to make a lot of notes as well, which helps, because I just can’t remember everything. I figure if I can remember where I stored some bit of information, that’s good enough.

And then there’s skills… Acquiring skills takes time, and practice, and doing things over and over again, and applying the knowledge you’ve acquired to the thing you’re trying to do. Design work, using tools, manipulating materials, writing words, capturing images… they all fall under skills.

As for ideas, I have plenty of them, I’m sure some (ok, most) of them are bad, or ridiculous. Often I go with the ridiculous ideas to see where it takes me, and along the way I hone my skills and acquire more knowledge. Occasionally in doing so I create a thing, and I enjoy the process and the journey.

Maybe I should call this the KIS Principle (Knowledge, Ideas, Skills) for short.

Disclaimer: I don’t pretend to know what I’m talking about, and when I write this sort of thing it’s really just an exploration of my thoughts, typed out on the screen. Occasionally I feel like sharing these thoughts with the world.

MsgViewer

Occasionally I save an email message from Thunderbird to a file, and when I do that the file has an .eml extension. For those new to this concept, the .eml file extension is usually applied to files in the MIME RFC 822 standard format used by email applications. You can open that .eml file using Thunderbird (which is available on Mac OS X, Windows, and Linux) or using Mail.app on Mac OS X, and I’m sure using many other applications that adhere to the standards. I can even open .eml files in a text editor and easily read the text/plain portion of a multi-part email message.

Unfortunately I recently came across some emails with a .msg extension. It seems that Microsoft Outlook saves emails files to disk as .msg files, which is probably not the MIME RFC 822 standard format, and is some weird format you can’t easily read without Outlook… (It’s actually based on the “Compound File Binary Format” and require a MAPI-aware application to view them.)

Luckily MsgViewer is an application (well, a JAR file) which (as long as you’ve got Java installed) can open these .msg files. You can grab MsgViewer from SourceForge.

And seriously, why does Microsoft do this kind of stuff??

« Older Entries | Newer Entries »

support:



photos:


buy the button:

Buy The Button

top recent artists: