GenAI as an IoT programming assistant: a case study on automated debugging for air quality monitoring systems - Steven Imanel Bawole; Handri Santoso (Universitas Ahmad Dahlan, 2026)
The rapid expansion of internet of things (IoT) technology has necessitated the development of user-friendly programming solutions for non–experts. While generative artificial intelligence (GenAI) offers the potential to democratize code development, its ability to assist in the intricate task of automated debugging, particularly regarding hardware integration remains a critical area of research. A design research approach was employed, employing a structured four – phase workflow: error analysis, diagnostic execution through prompting, iterative solution analysis, and functional verification. The methodology was applied to an experimental case study involving an air quality (AQ) monitoring system. The study tested the artificial intelligence (AI)’s capacity to debug C++ code intended for the Arduino integrated development environment (IDE). Gemini AI successfully identified and resolved three critical logic errors arising from mismanaged MQ135 calibration variables, incorrect loop sequencing, and data desynchronization between the organic light emitting diode (OLED) display and the internal status logic. GenAI proved effective as a programming assistant for resolving bugs in IoT applications. However, effective debugging still depends on well-structured prompts and a basic understanding of the underlying IoT hardware.