When I first attempted delivering visual stimulation to fish during light-field recording, I used the LCD screen left over from the successful project of my predecessor Cris Niell. This system was designed for use with the two photon microscope, which uses an infrared wavelength of light to excite fluorescence in the fish brain, and is thus invisible to the fish. In a dark chamber, the small amount of light put out by the LCD was sufficient to interest the baby fish. The light-field, however, is a one-photon technique, and thus the excitation light is quite visible to the fish as a massive blue beam, not unlike something out of Close Encounters of the Third Kind, I imagine.
Against this background, the LCD could not produce enough of a visual stimulus to engage the fish tectum, or at least that was how I explained my inability to record a visually-evoked calcium signal. I did see such signals if I coupled a red laser with an optic fiber and placed it right up near the fish retina. So, how to generate visual patterns with laser-like intensity and contrast, but in a 2D manner?
Wandering around my favorite electronic component website one day, I saw that they had begun carrying tiny OLED screens for only $71 (now reduced to like $50!). OLED stands for Organic Light Emitting Diode, which means this little screen is basically an array of tiny little individually-addressable LEDs. As you may know from recent camping trips or encounters with upwardly-mobile folks driving German automobiles, LEDs can be really bright! In addition, when an OLED pixel is off, it is truly off - no power runs through it, and so no light is emitted. This is in contrast to LCDs, where each pixel filters the output of a bright white backlight - even when a pixel is filtering as hard as it can (i.e. it is set to black), some light pokes through. What this means for me and my fish is the OLED creates a beautiful, bright, high-contrast image, beautiful enough to engage the neurons of the optic tectum, providing me lovely visually-evoked calcium signals, which the light-field records in 3D. Here are the details on the stimulation setup.
Hardware: I’ve got the OLED display, one µOLED-96-G1 from 4D Displays (out of Australia, I believe), purchased from SparkFun for ~$71. It is 0.96” across, and will just fit under the microscope objective. I made a chamber using an old Pomona Electronics project box. It’s black plastic, fairly shiny, but I sanded the inside to induce more photon scattering / absorption. The idea is to basically build a movie theater for the fish, with stunning contrast and acoustics (well...). I milled a hole just the size of the screen active area (20mm x 14mm), and then glued a cover slip to the outer edge (for waterproofage). Then screw the OLED to the chamber so it presses against the coverslip. Click the image below for a video showing the chamber setup rotating (is this video itself a type of light-field, capturing multiple angles at multiple spatial positions, except with every view recorded at a separate time point rather than all at once? I think so!):

(click for 3D view)
Software: This particular OLED can be controlled in two ways. Well three, kinda.
1. Real-time Drawing: The included GPU (I don’t think it has the parallel processing power expected of typical desktop GPUs) can draw graphical primitives directly to the screen, based on byte input arriving over the serial port. So, sending something like “0x43 0x20 0x30 0x04 0x61 0x33” (not sure why the ‘0x’ - some kind of byte type designator I guess) will draw a circle centered at (20, 30) with a radius of 4 pixels and a whitish color (that’s the last two bytes, who’s encoding I still don’t quite understand). The display can also produce single pixels, rectangles, and lines, as well as text. I ported Oscar’s Arduino OLED library over to Processing (I’m not gonna lie, it was easy), so you can use that elegant language to script your real-time OLED antics, or make the screen react to any input device which Processing can understand (i.e. pretty much any input device - get your Wii on!). If you have a serial port on your computer, you’re a very lucky person - I haven’t seen one of those in years. I convinced a MacBook Amateur to speak with the OLED via a USB-UART convertor CP2102 (driver or driver). You can view a screencast of the stimulation software I wrote here, and you can download the Processing code here. Make sure you add the OLED library (oled160drv.pde) to your Processing sketch file, like this.

(click for screencast)
2. Hard-coded Drawing: If you intend to use the screen in embedded applications, or don’t want to tie up your serial port, or want fast hardware triggering, or... (other ideas appreciated), you can hard-code your animations into the memory of a microcontroller. A Spaniard named Oscar wrote a hardware library to allow the famous Arduino to talk with this family of OLED screens, and someone named Jenny wrote a nice tutorial on the subject. I may end up using this method, once I’ve got some nice animation code worked out, as it will allow me to trigger the animation in hardware through the Arduino’s digital input channels, driven from MatLab (via the DAQ board, or parallel port), which is the software environment currently orchestrating my camera frame / visual stimulus symphony. I’m hoping this will allow for more precise triggering than attempting to thread my stimulation routines through the Windows concurrency minefield, but I haven’t actually tried it yet (and super-precise timing is not crucial for my project, running as it does at 4 fps). The Arduino has a total of 14 DIOs (that’s Digital Input / Output) ports, one of which is used to reset the OLED, leaving 13 bits to specify animations. That should be 2^13 possibilities; I probably need 2^4. In addition, this microcontroller option will make the whole stimulation system oh so portable (if not so easily re-programable) - maybe I can even take it to Mexico.
3. Reading From a Flash Card: Okay, if you weren’t already sitting down & freaking out, please now take a seat and prepare to _freak_ _it_ _out_! This tiny OLED contraption also comes with an SD card slot (well, micro SD, but don’t let that dampen your enthusiasm, a 1 gig card with adapters to mini and regular SD card sizes will run you $10 at a physcial store, like Frys)! You can tell the OLED GPU, via serial commands, to read images or movies (AVIs, uncompressed I think) off this memory (up to 2 gb worth, or half a season of The Deadliest Catch - that’s a lot of stimulation for a juvenile zebrafish!). These commands are kind of annoying, because you must use 4D Systems crazy sector mapping program to find the memory addresses of the images / movies you load onto the card, but it is never-the-less quite cool. I might use this to display natural stimuli to the fish, which is something I’ve always wanted to try. After all, these little guys didn’t evolve to chase bright blue perfect circles through the darkness.