The design of heating, ventilation and air conditioning (HVAC) systems is crucial for reducing energy consumption in buildings. As complex cyber-physical systems, HVAC systems involve three closely-related subsystems - the control algorithm, the physical building and environment and the embedded implementation platform. In the traditional top-down approach, the control algorithm and the embedded platform are in general designed separately leading to suboptimal systems. We propose a co-design approach that analyzes the interaction between the control algorithm and the embedded platform through a set of interface variables (in this paper we address in particular sensing accuracy). We present six control algorithms that take into account the sensing error, and model the relation of control performance and cost versus sensing error. We also capture the relation of embedded platform cost versus sensing error by analysis of the collected data from a testbed. Based on these models, we explore the co-design of the control algorithm and the temperature sensing subsystem of the embedded platform to optimize with respect to energy cost and monetary cost while satisfying the constraints for user comfort level.