We are developing a miniature flying robot based on the body and brain of the honeybee. The RoboBee project, a collaboration between Northeastern University, Harvard University and Centeye, Inc, aims to engineer a versatile swarm of robots that can be used for a variety of purposes, including crop pollination, search and rescue mission support, hazardous environment exploration, and traffic monitoring. We present an electronic nervous system based on neurophysiological and behavioral principles of the bee that can be used to control a variety of flight control parameters of the robot in a computationally efficient manner. Simulated neurons and synapses that mimic the activity of their biological counterparts comprise multimodal reflex networks that allow the robot to produce a coherent behavioral output. These neural networks can mediate heading control, distance estimation, orientation, hovering in place, wind compensation, and obstacle avoidance. The development of a biomimetic control architecture for a flying robot represents an exciting step forward in efforts to engineer adaptive autonomous vehicles.