The trainer kit is programmed to operate in four progressive modes, each introducing a
new level of complexity in embedded programming and logic.
Mode 1: Free-Running Counter
In this baseline mode, the microcontroller functions as a three-bit binary counter. The
count is displayed in binary via three dedicated LEDs. A potentiometer is utilized to
provide a variable clock speed, allowing the user to observe the count sequence at different
frequencies.
Mode 2: Manual Increment Counter
This mode transitions from an automated clock to a user-triggered input. The counter
increments only when the push button is pressed and released. This demonstrates the
implementation of external interrupts or polling-based input handling.
Mode 3: Electronic Dice (Random Number Generator)
The hardware remains identical to the previous modes, but the software logic is altered
to generate a random number between 1 and 6. Upon pressing and releasing the button,
the 7-segment display shows a randomized result, simulating an electronic die.
Mode 4: Visitor Counter
The final mode utilizes the two photo-gates to implement a sophisticated visitor counter.
This mode teaches the concept of a Finite State Machine (FSM). The system requires a
specific sequence of triggers (Sensor A then Sensor B) to register a person entering the
room. The software ensures that partial interruptions or reversals do not result in a false
count, demonstrating how microcontrollers handle complex real-world logic.
A key lesson of the trainer kit is the elimination of external decoding hardware. In
traditional digital circuits, a BCD-to-7-segment decoder IC would be required to drive a
display from a counter. In this trainer, the Arduino directly drives the seven segments
(A through G).
The software maps the internal counter value to the specific bit patterns required
to light the corresponding segments of the display. This ”one-to-one” correspondence
between the microcontroller’s outputs and the display segments reinforces the concept
that software can replace physical logic ICs.