This paper presents the architecture of an onboard controller developed for the HERO autonomous helicopter, which is a low-cost unmanned aerial vehicle research platform. An embedded digital-signal-processor-based low-level controller is devoted to flight control, while a PC-based high-level controller is used for onboard perception tasks and interaction with other agents in a distributed system. The functional design, software architecture, and implementation of the low-level controller are analyzed in detail, focusing mainly on its runtime environment (JULIET) and its capability for flexible reconfiguration. The connectivity functions of the low-level controller with external possibly distributed agents are also addressed. Finally, the results of real autonomous flight experiments are presented, including the tracking of a smooth 3-D path described by over two hundred waypoints.