TY - EJOU AU - Gunawardhana, Rajani Navoda AU - Wijayasiriwardhane, Thareendhra Keerthi TI - Agentic AI Code Generation vs. Human Authorship: Stylometric Detection in Firmware Written for Arduino Platform T2 - Computers, Materials \& Continua PY - VL - IS - SN - 1546-2226 AB - In modern education, learning Science, Technology, Engineering, and Mathematics (STEM) has become an essential requirement. Physical computing, embedded systems, and Internet of Things (IoT) are widely used in STEM education, and the Arduino platform has emerged as a de facto standard for teaching and learning these technologies. However, with recent advancements in Artificial Intelligence (AI), students are tempted to over-rely on Large Language Models (LLMs). As a result, the auto-generation of software source codes by students using LLMs poses a significant threat to achieving the Intended Learning Outcomes (ILOs) of their course of study. Unlike conventional software source code developed for general-purpose computing, firmware written for the Arduino platform directly interacts with hardware components and follows domain-specific syntactic and structural patterns. As a result, existing AI-based auto code detectors often underperform when detecting auto-generated firmware for the Arduino platform. This paper presents an approach for detecting LLM-generated firmware source code for the Arduino platform using code stylometry features. The proposed method evaluates lexical and syntactic features to distinguish LLM-generated and human-written firmware for the Arduino platform. The experimental results demonstrate an accuracy of 0.9413, indicating that the proposed approach can effectively classify whether firmware is authored by a human or generated by an LLM. KW - AI-generated firmware; Arduino; STEM education; large language models; auto code detection DO - 10.32604/cmc.2026.084610