This project is an extension of the Flyception system developed by researchers at the Kavli Institute for Brain and Mind at University of California, San Diego. The Flyception system used a system of mirrors and cameras to track the motion of a free-moving fruit fly in order to observe neural activity using phosphorescence from genetically encoded calcium sensors. This allowed researchers to observe the neural activity of fruit flies during actions which traditional methods, which require immobilizing the flies, do not allow. The drawback to this system is that, because the camera sensor and lensing is far away from the fly, the resolution of the brain imaging is limited. The new system, named flyBAM, places the free-moving fly in an arena beneath a fixed objective lens of a microscope and moving the arena beneath the lens in order to keep the fly in frame. The researchers leading the project, Dhruv Grover and Takeo Katsuki, provided us with an OpenCV based system for detecting fly movement direction. Our team's role on the project was to develop a high speed link from the computer running the image processing to the microscope's XY-stage controller (C-867 PILine® Motion Controller).