Based on the virtual instrument software development platform of graphical compilation language (G language) connect STH10 temperature and humidity sensor to STM32 development board, adopt automatic data collection method, use the STM32 development board to collect and display indoor temperature and humidity data in real-time and then pass the data to host computer, use programs written by LabView to display, process, store temperature and humidity data collected by the serial port , and display the real-time temperature and humidity data and waveform figure in the STM32 LCD and panel and front panel. This system can monitor the energy situation, analyze the collected data, further build energy consumption data control system, and effectively control the school internal energy resources consumption.