The COVID-19 pandemic brought significant consequences on healthcare systems, economy, and politics. Nowadays, we know that the pathogen responsible for COVID-19 is transmitted mainly by aerosol droplets exhaled by infected individuals, which remain suspended in indoor air. There has been widespread interest in monitoring the \(CO_2\) levels in indoor spaces since an infected patient exhales \(CO_2\) and infectious aerosols when breathing. So, we designed and built an Air Quality Monitoring Device (AQMD) that measures and analyzes the levels of \(CO_2\) and particulate matter in the classrooms of a university with the aim of mitigating the spread of COVID-19. We divided the AQMD design into 2 phases: (i) data measurement and (ii) estimation of infection risk. Specifically, we measured the air quality in 3 classrooms of a university during different types of activities. Using these data, we calculated the recommended \(CO_2\) threshold for our classroom setting and estimated the probability of COVID-19 infection of a susceptible person. Our research shows that indoor \(CO_2\) concentrations and the probability of COVID-19 infection are influenced mainly by the type of activity and the number of windows open; besides, the number of students does not significantly impact the indoor \(CO_2\) concentrations levels because the range of students in the test scenario (18 to 31) was relatively small.