The approach to the built environment as a container of human activities has been severely outdated with a new vision that puts the user, his/her well-being and his/her experience, at the centre, shifting from the old “building as a product” to the newer “building as a service” and the newest “building as an experience” concept. Nevertheless, the sick building syndrome, mainly documented in office buildings, is a widespread problem in many public buildings and, among these, in educational facilities. In these categories we can list school and university buildings where the users are not only workers but also students, sharing anyway the same problem: an artificial environment which is not supporting their productivity in the office or learning performance in the classrooms. Carbon dioxide concentration, due to the natural human breathing process, is a diffuse parameter strongly influencing the indoor air quality and, thus, the users’ wellbeing. An acceptance threshold of 1000 ppm in indoor spaces has been derived for this pollutant. Although allowed, the CO2 concentration in indoor space shouldn’t reach this threshold because in such a condition a 11–23% reduction of the users’ cognitive performance has been measured and, when the level increases reaching 2500 ppm, the reported drop is dramatic (44–94%). Extensive researches set the optimal threshold at 600 ppm, a level defined as fresh air. Then, how is it possible to encompass a natural process as CO2 production by humans? Basically with the correct ventilation rate, depending on room geometry, number of people and ventilation system (i.e. natural or mechanical or mixed). A modulating mechanical ventilation system could adapt the ventilation rate according to people density and changing indoor conditions nevertheless many existing buildings have outdated systems not providing this option. Sometimes their air handling units (AHUs) have few regulation options to control the parameters and tuning procedures during the building lifecycle are required. CO2 concentration is convenient to measure indoor air quality because it is easily quantifiable through a sensors network. Thus, it may be adopted as an indicator to assess suitable indoor conditions to human activities and used to trigger manual or automatic procedures to preserve wellbeing thresholds. The article presents a research work depicting the integration of indoor air quality data gathered by internet of things (IoT) sensors to activate the control of the indoor conditions according to the occupancy rate in the educational building eLUX lab, located in the Smart Campus of the University of Brescia. The challenge is to directly regulate the heating, ventilation and air conditioning (HVAC) systems and define opening/closing patterns for windows to improve the indoor air quality and protect the learning performance of users in dynamic use conditions. The embraced methodology suggests the training of an artificial neural network (ANN) with the actual monitored data and to trigger the ventilation rate control through an IoT communication protocol.