An Embedded Real-time System for Climate Control in a Complex Greenhouse