So last week’s assignment for experimental media was to do anything that has bidirectional serial communication – i.e. sending messages over usb to and from my pc.
I’m starting to think about ways that I can get people to interact with things that I make without relying solely on a keyboard and mouse. So I built this Unity sketch that I named ‘Flood.’ The current version doesn’t have much to do with the title. I ran out of time but oh well, maybe I’ll revisit it later. The controls involve the standard keyboard/mouse combo, but they also involve plugging/unplugging some LEDs connected to my arduino.
I got quite bogged down in the technical details of getting this working… Unity has some trouble reading from serial directly, so I had to introduce an intermediate application. My arduino (which controls the LEDs) communicates back and forth with an openFrameworks app via a serial usb connection. openFrameworks then communicates back and forth with Unity via a local server. So I blame all of that for the shoddy quality of my video recording below :P
(Ignore the bug on the first switch of the LED. I messed up and started my software out of sync, so it needed something to trigger the first syncing message between arduino and unity.)
And here’s a playable version that doesn’t require an arduino which sort of defeats the whole purpose of it. Mouse to look, WASD to move, left click (or left shift) to turn LED on/off, right click (or left control) to disconnect/reconnect LED.