Skip to main content


[UPDATE 10/20/2014: #WittyLights has been officially replaced by @WittyDevices. Please go to that page for info on how to interact with the new cloud-based system.]

[UPDATE 10/18/2014: I've made numerous bug fixes and a few improvements to the code, which will be made available shortly. For now, though, know that you now simply tweet your command to @WittyDevices instead of including a specific keyword hashtag. You'll know if everything is up and running if you receive a reply!]

I study something called "computational linguistics." If that name doesn't sound familiar, then maybe the computer science term for the same thing will somehow make more sense: natural language programming, or NLP for short. Both are essentially working on the same thing, albeit with slightly different approaches. While computational linguistics (hereafter referred to as CL) is concerned with modeling natural language (read: the same type of speech or writing you use with other people every day), NLP is a bit more focused on building and improving human-computer interactions. The main difference between these two is the department in which a practitioner of each field might study: CL approaches the topic area from a linguistic perspective while someone concerned with NLP typically has a strong background in computer science.

From that description, you might be wondering why someone studying CL is tinkering with an Arduino prototyping board. Isn't that more of a computer science / engineering type of thing? Probably. But just because I'm more involved on the linguistics side of things doesn't mean that I don't have a strong interest in electronics and software development. That's why I like building things that combine all of my interests: design, computers and natural language just to name a few.

One of my most recent creations taps into the services of Wit, a company that offers NLP services that anyone can tap into. More specifically put, they are capable of taking a command given in natural language and returning a message that is more easily understood by a computer program. In the case of my creation, I have a line of LEDs all connected to an Arduino Uno which is, in turn, connected to my computer. The program running on the Arduino interprets a string of digits (consisting of 0's and 1's) corresponding to each LED, illuminating the proper LED as requested. A Java program on my computer handles the rest: monitoring Twitter for the occurrence of a specific hashtag (#WittyLights), sending the matching tweets to Wit, then forming a command string out of Wit's response. That string is then communicated to the Arduino via serial connection.

Tl;dr? Anyone can control a set of lights on my desk. If you tweet Turn on light 4 #WittyLights, then the corresponding LED on my desk illuminates. Lights can be turned both on and off. Of course, given that my computer is a laptop that I take with me to campus, you have to hope that I'm actually at my desk, with the Arduino plugged in and the Java control app up and running. If I can justify it, I'll get myself a Raspberry Pi/Intel Edison and set it up to run constantly, but for now this is the limits of the implementation.

What's next? Well, given that there are new capabilities and data formatting upgrades available from Wit, I'll probably use my free time to learn what else can be done with the API. In the meantime, if anyone is interested in seeing the source code for this hack, [Link removed, see newer @WittyDevices post for updated source code.] and give me a shout on Twitter if you have any questions or suggestions: @kuzmeister