Maker.io main logo

Arduino OLED Countdown Timer Using Visual Programming

2025-06-06 | By Ron Cutts

License: General Public License Addressable LEDs Displays Encoder LED / Display Drivers LED Matrix LEDs / Discrete / Modules Real Time Clocks (RTCs) Arduino

 

  1. Use a rotary encoder to set the countdown duration

  2. Start the timer by pressing the encoder button

  3. Watch the countdown update in real time on an OLED display

  4. Trigger a Red LED when the countdown reaches zero

All done with no coding, just simple drag-and-drop blocks in Visuino!

Perfect for beginners and makers looking for a practical timer easy to build.

Watch the Video!

Step 1: What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

What You Will Need

  1. Arduino UNO or any other Arduino board

  2. Breadboard

  3. OLED Display

  4. 1k ohm resistor

  5. LED

  6. Rotary encoder

  7. Jumper wires

  8. Visuino software: Download here

Step 2: The Circuit

The Circuit

🔌 OLED Display Connections

  1. Connect OLED Display pin [SCL] to Arduino pin [SCL]

  2. Connect OLED Display pin [SDA] to Arduino pin [SDA]

  3. Connect OLED Display pin [VCC] to Arduino pin [5V]

  4. Connect OLED Display pin [GND] to Arduino pin [GND]

🔄 Rotary Encoder Module Connections

  1. Connect Encoder pin [CLK] to Arduino pin [3]

  2. Connect Encoder pin [DT] to Arduino pin [2]

  3. Connect Encoder pin [SW] to Arduino pin [4]

  4. Connect Encoder pin [+ (VCC)] to Arduino pin [5V]

  5. Connect Encoder pin [GND] to Arduino pin [GND]

🔴 LED Output Connection

  1. Connect the 220Ω resistor to Arduino pin [5]

  2. Connect the anode (long leg) of the Red LED to the resistor

  3. Connect the cathode (short leg) of the LED to Arduino [GND]

Step 3: Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type

Start Visuino, and Select the Arduino UNO Board Type

The Visuino: https://www.visuino.com also needs to be installed.

Start Visuino as shown in the first picture. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino. When the dialog appears, select "Arduino UNO" as shown in Picture 2

Step 4: In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

In Visuino Add Components

  1. Add "OLED I2C" component

  2. Add "Debounce Button" component

  3. Add "Digital (Boolean) Inverter (Not)" component

  4. Add 2X "Digital Multi Source" component

  5. Add "Rotary Encoder" component

  6. Add "Toggle(T) Flip-Flop" component

  7. Add "Pulse Generator" component

  8. Add 3X "Integer Multi Source" component

  9. Add 2X "Integer Multi-Source Merger" component

  10. Add "Up/Down Counter" component

  11. Add "Divide Integer By Value" component

  12. Add "Multiply Integer By Value" component

  13. Add "Subtract Integer Value" component

  14. Add "Formatted Text" component

Step 5: In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

In Visuino Set Components

  1. Select "MultiSource1" and in the properties window set "Output Pins" to 3

  2. Select "UpDownCounter1" and in the properties window select: "Initial Value" and set 10

  3. Set "Max > Roll Over" to False, "Min > Roll Over" to False, and Min Value to 0.

  4. Select "PulseGenerator1", in the properties window, select "Enabled", click on the pin icon, select "Boolean SinkPin", and set "Enabled" to False

  5. Select "MultiSource2" and in the properties window set "Output Pins" to 3

  6. Select "RotaryEncoderSensor1", in the properties window select: "Initial Value", set 10, set "Max > Roll Over" to False, "Min > Roll Over" to False, and Min Value to 0.

  7. Select "DivideByValue1" and in the properties window set Value to 60

  8. Select "MultiplyByValue1" and in the properties window set Value to 60

  9. Select "SubtractValue1", in the properties window select Value, click on the Pin Icon, and select "Integer SinkPin"

  10. Select "FormattedText1" and in the properties window set "Text" to: %0:%1

  11. Double click on "FormattedText1", in the Elements window, drag 2X "Text Element" to the left side, and for both in the Properties window set "Fill Character" to 0, and "Length" to 2

  12. Double click on "DisplayOLED1" and in the Elements window drag "Text Field" to the left side and in the properties window set "Size" to 2 "X" to 30 and "Y" to 20

Step 6: In Visuino Connect Components

imageimageimage

  1. Connect Arduino digital pin [2] to "RotaryEncoder1" pin Clock (A)

  2. Connect Arduino digital pin [3] to "RotaryEncoder1" pin Data (B)

  3. Connect Arduino digital pin [4] to "Button1" pin [In]

  4. Connect "Button1" pin [Out] to "Inverter1" pin [In]

  5. Connect "Inverter1" pin [Out] to "MultiSource1" pin [In]

  6. Connect "MultiSource1" pin [Out][0] to "UpDownCounter1" pin [Reset]

  7. Connect "MultiSource1" pin [Out][1] to "FormattedText1" pin [Clock]

  8. Connect "MultiSource1" pin [Out][2] to "TFlipFlop1" pin [Clock]

  9. Connect "DivideByValue1" pin [Out] to "IntegerMultiSource1" pin [In]

  10. Connect "IntegerMultiSource1" pin [Out][0] to "FormattedText1" pin [Clock]

  11. Connect "IntegerMultiSource1" pin [Out][0] to "FormattedText1" > "TextElement1" pin [In]

  12. Connect "IntegerMultiSource1" pin [Out][1] to "MultiplyByValue1" pin [In]

  13. Connect "MultiplyByValue1" pin [Out] to "SubtractValue1" pin [Value]

  14. Connect "SubtractValue1" pin [Out] to "FormattedText1" pin [Clock]

  15. Connect "SubtractValue1" pin [Out] to "FormattedText1" > "TextElement2" pin [In]

  16. Connect "FormattedText1" pin [Out] to "DisplayOLED1" > "Text Field1" pin [Clock]

  17. Connect "FormattedText1" pin [Out] to "DisplayOLED1" > "Text Field1" pin [In]

  18. Connect "DisplayOLED1" pin [Out] to "Arduino" > "I2C" pin [In]

  19. Connect "UpDownCounter1" pin [Out] to "IntegerMultiMerger1" pin [In][0]

  20. Connect "IntegerMultiMerger1" pin [Out] to "IntegerMultiSource2" pin [In]

  21. Connect "IntegerMultiSource2" pin [Out][0] to "DivideByValue1" pin [In]

  22. Connect "IntegerMultiSource2" pin [Out][1] to "SubtractValue1" pin [In]

  23. Connect "IntegerMultiSource2" pin [Out][2] to "CompareValue1" pin [In]

  24. Connect "IntegerMultiSource2" pin [Out][3] to "FormattedText1" pin [Clock]

  25. Connect "CompareValue1" pin [Out] to "Arduino" digital pin [5]

  26. Connect "PulseGenerator1" pin [Out] to "DigitalMultiSource1" pin [In]

  27. Connect "DigitalMultiSource1" pin [Out][0] to "UpDownCounter1" pin [Down]

  28. Connect "DigitalMultiSource1" pin [Out][1] to "FormattedText1" pin [Clock]

  29. Connect "RotaryEncoderSensor1" pin [Out] to "MultiSource2" pin [In]

  30. Connect "MultiSource2" pin [Out][0] to "IntegerMultiMerger1" pin [In][1]

  31. Connect "MultiSource2" pin [Out][1] to "UpDownCounter1" pin [Reset]

  32. Connect "MultiSource2" pin [Out][2] to "UpDownCounter1" pin [InitialValue]

  33. Connect "TFlipFlop1" pin [Out] to "PulseGenerator1" pin [Enabled]

  34. Connect "UpDownCounter1" pin [MinReached] to "TFlipFlop1" pin [Reset]

Step 7: Generate, Compile, and Upload the Arduino Code

Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom, click on the "Build" Tab, make sure the correct port is selected, then click the "Compile/Build and Upload" button.

Step 8: Play

When you power on the Arduino, the OLED display will show the default countdown time of 00:10.

You can easily adjust the countdown time by rotating the rotary encoder left or right. Once you've set your desired time, simply press the encoder button to start the countdown.

During the countdown, you can pause or resume at any time by pressing the button again.

When the countdown reaches zero, a red LED will turn ON to signal that the time is up.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project for this. You can download it and open it in Visuino: https://www.visuino.com

Download Visuino File: OLED-CountDown-Timer-Encoder.visuino

Mfr Part # 104020208
GRAPHIC DISPLAY MONOCHROME WHITE
Seeed Technology Co., Ltd
Mfr Part # A000066
ARDUINO UNO R3 ATMEGA328P BOARD
Arduino
More Info
View More Details
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.