In recent years, the application of the Internet of Things (IoT) has become more and more widespread, and the application of the IoT to the greenhouse microclimate control is one of the key objectives of the modern agricultural system. In this thesis, a greenhouse microclimate control system based on IoT is designed. The sensor is used to collect environmental factors, and the Bayesian network is used for analysis and decision making. At present, most of the designed greenhouse microclimate control systems are controlled by a single factor. This system can conduct environmental control decision analysis based on multiple factors to avoid misjudgment due to single factor anomalies. The main purpose of this thesis is to conduct greenhouse microclimate control after analyzing and determining the factors according to the Bayesian network to provide a suitable growth environment for crops.