In order to realize a kind of intelligent window function, a window control system for reference is designed. This system can automatically control the switch of window according to the surrounding environment. Realize the intelligent control functions of opening window when the light intensity is too strong or too weak, closing window when the temperature is too high or too low, closing window when the person is close (mainly used to prevent the occurrence of children's falling accidents) and opening window when the fire occurs/gas leakage, in addition to manual control of window. The system uses STM32F103C8T6 as the main control chip, carrying OLED display module, photosensitive resistance sensor module, thermistor sensor module, MQ-2 smoke/gas sensor module, infrared reflection sensor module, TB6612 motor driver module and its controlled DC motor. Each sensor module transmits the detected analog quantity to the main control chip through the ADC conversion channel, and the main control chip processes it according to the program and then controls the motor drive module to control the working state of the DC motor, and finally completes the intelligent control functions.