FlyMAD
This tip comes from John Stowers. He and his colleagues developed an open source opto- and thermo- genetic system for targeting freely moving Drosophila with lasers.
He wrote a long post discussing some of the technical challenges (Python, real-time considerations, architecture, distributing the software to colleagues, etc.) here.
Thanks for sharing, John.