This has comments on my writing and reading. Primarily about Mycroft Holmes and stories involving him. Secondarily about whatever I'm reading at the moment.

Sunday, November 18, 2012

The Magic Raspberry

I got my Raspberry Pi put into an enclosure and doing great things running XBMC with my TV. I wasn't thinking and I picked up the TV Remote Control instead of the micro wireless keyboard. Instead of pushing the arrow buttons on the keyboard, I pushed the arrow buttons on the remote control.

It did what I wanted.

Then I stopped. Oh my gosh. How did that do that? That shouldn't have worked.

I'm an engineer. I understand things. If you push a button on a remote control, infrared light waves go speeding to an eye built into the TV. The Raspberry Pi has no eyes. It is blind to infrared light and everything else. It CAN'T respond to the remote!

Your eye does not work in the infrared. So, when you push the button on the remote control, you don't see anything. Your smartphone's camera uses a sensor that is sensitive to infrared. So, when you aim a remote at it, you can tell whether it's emitting or not.(If you're a terrorist worried about infrared targeting lasers from the US military, you already know this. I said I understand things.)

My wife held the remote up to the camera with the button off and the button pushed on so that we could illustrate this.

How in the world did my Raspberry Pi figure out that I'd pushed the button on the TV remote?

After a bit of Googling, I found the HDMI standard and read about a CEC (Consumer Electronics Control) connection. If you have the right kind of HDTV, it can send commands back down the HDMI cable from the TV. And if the thang, Blu-Ray player, cable box, satellite box, whatever, is smart enough, it'll respond to those commands. It's like freaking magic.

This has profound ramifications for use of a Raspberry Pi as a set top computer. You don't need to hook ANY MOUSE or KEYBOARD to it: Just power, HDMI, and Ethernet. No USB hub or even those cute little wireless dongles.

So, I got to thinking, let's try this on my other TV set. I did. No joy. HDMI CEC is not on every TV set, just a select few. Since Black Friday is coming up, you might want to know what to look for if you're going to be buying a TV.