Skip to main content
Digital I/O

Mechatronics Lab Professor — SJSU

Digital I/O

Hands-on Arduino lab introducing students to digital input/output fundamentals, pin configuration, and interrupt-driven event handling.

As part of my role as Mechatronics Lab Professor at San Jose State University, I developed and taught Lab 4: Digital I/O — a foundational exercise that introduced students to the world of embedded systems using Arduino. The lab bridged theoretical and practical aspects of mechatronics, giving students direct experience with pin-level hardware interaction.

Students configured digital pins as inputs and outputs, wired pushbuttons with pull-up and pull-down resistors, and drove LEDs through current-limiting circuits. The lab progressed from basic digitalRead() / digitalWrite() calls to debouncing techniques and interrupt-driven event handling using attachInterrupt(). Each exercise built on the last, reinforcing the connection between schematic diagrams and working code.

A key emphasis was on reading and interpreting datasheets — students learned to identify GPIO pin mappings, maximum source/sink current ratings, and logic-level thresholds on the ATmega328P. The lab concluded with a timed challenge where students combined multiple inputs and outputs to build a simple state machine (e.g., a traffic-light controller), integrating everything they had learned into a cohesive system.

ArduinoDigital I/OEmbedded SystemsGPIOEducation