Source: https://mokxi.com/learn/arduino-practical-exam-practice
Updated: 2026-10-05

Learn

# Arduino practical exam practice: ten tasks against the clock

Beginner

Written by the Mokxi team, updated October 5, 2026

Start building free Open the editor

Or see every lesson.

- 261 parts on the bench
- 31 boards running now
- 1.00x real time, on every board

Press a button to change the tempo

A piezo on pin 7 clicks the beat, an LED on pin 9 flashes it, and buttons on pins 2 and 3 change the tempo.

In an Arduino practical exam, you usually get a task, a kit and a time limit. You wire the circuit, write the sketch and show it working. This page gives you ten tasks of the kind that often come up, so you can practice in your browser before the day.

The circuit above is a metronome on an Arduino Uno. It uses a piezo, an LED and two buttons, which covers a lot of what a practical exam asks for. Press a button to change the tempo.

Each task names a project on this site. Try the task first on a blank board, with a timer running. Then open the project and compare.

## How to practice

Open the editor, place an Arduino Uno and a breadboard, and start a timer on your phone. Give yourself the time your exam gives. Many practical exams allow 30 to 60 minutes for a task, but check your own.

Wire the circuit from memory. Write the sketch with no copying. Press Run. If it works, stop the timer and write down the time. If it does not, find the bug before you look at the answer.

Keep a list of your times. When a task takes less than half the exam time, move on to the next one. Come back to the hard ones the day before.

Some built-in projects use small helper headers made for Mokxi, such as mokxi_tone.h. In an exam, use the standard Arduino calls, like tone() and digitalWrite(). They work in Mokxi too.

## Tasks 1 to 4: outputs and inputs

Task 1. Blink an LED on pin 13, one second on and one second off. Then change it to 200 ms on and 800 ms off. Check against the first blink project.

Task 2. A button on pin 2 turns an LED on while it is held. Then make each press toggle the LED instead. You will need INPUT_PULLUP and a debounce. Check against the button debounce tutorial.

Task 3. A traffic light: red, amber and green LEDs in the right order, with the right times. Add a button to ask to cross. Check against the traffic light project.

Task 4. A running light: six or eight LEDs light one after another, then back. Use an array for the pins and a for loop. Check against the knight rider project, which runs on an ESP32-C3 with the same idea.

## Tasks 5 to 7: analog and sound

Task 5. A potentiometer on A0 sets the brightness of an LED on pin 9. Print the reading to the serial monitor. Check against the dimmer project.

Task 6. An LDR in a voltage divider turns an LED on when it gets dark. Pick a threshold and explain it. Check against the night light project.

Task 7. A piezo plays a beat, and two buttons change the speed. This is the metronome above. Write it with tone(), then compare it with the built-in one.

## Tasks 8 to 10: sensors and displays

Task 8. Read a TMP36 or an LM35 on A0 and print the temperature in degrees Celsius. Know the difference: a TMP36 has a 500 mV offset at 0 degrees, and an LM35 has none. Check against the thermometer project.

Task 9. Measure distance with an HC-SR04 and print it in centimeters. Then make a buzzer beep faster as an object gets closer. Check against the parking sensor project.

Task 10. Show a count from 0 to 9 on a seven-segment display, one step each time a button is pressed. The electronic dice project shows how to light each digit.

## Mistakes that cost the most time

The LED is in backwards. The longer leg, the anode, goes toward the pin. The breadboard guide shows how to check it before you power it.

The pin in the code is not the pin in the wiring. Say each pin out loud as you wire it, and again as you type it.

Serial.begin() is missing, or the serial monitor is at a different baud rate. Nothing prints, and it looks like the sketch is broken.

A button with no pull-up. On a real board, the pin reads HIGH or LOW at random. Use INPUT_PULLUP and remember that pressed reads LOW.

A missing semicolon or bracket. Read the first error the compiler gives you, not the last one. The first is usually the real one.

Using delay() in a task that must react to a button. The button is missed while the board waits. Use millis() instead.

## On the day

Read the whole task before you touch a wire. Draw the circuit on paper and write the pin numbers next to it.

Build and test in small steps. Get one LED working, then add the next part. A small step that fails is easy to fix. A whole circuit that fails is not.

Keep the power off while you wire. Check the wiring once more before you connect the USB cable.

If you are asked to explain your code, say what each block does and why. The viva questions page covers the questions that often follow.

## Questions

Is practicing in a simulator enough?

It is a good start, because you practice the code and the wiring logic. Also practice on a real board if you can, so the breadboard and the USB cable feel familiar on the day.

Do I need an account?

No. The editor and every project open with no account. A free account lets you save any number of public projects and up to five private or link-only ones, so you can keep your practice circuits.

Can I practice with a friend?

Yes. One person picks a task and the other builds it against the clock. Share the finished project with a link, check it together, and then swap.

What if my exam kit has different parts?

The ideas are the same. A different LED color or button size does not change the code. If your kit has a module that is not listed here, look for it in the parts bin.

Which board should I practice on?

The board your exam uses. Most use the Arduino Uno. The Nano and the Mega are here too, with the same code.

Related

## Keep going

Blink an LED with Arduino: Wiring and the Resistor Arduino Button Debounce: See the Bounce, Then Fix It Arduino Traffic Light with a Crossing Button Arduino LDR Night Light (Photoresistor) Arduino TMP36 Temperature Sensor in °F and °C Arduino Ultrasonic Sensor (HC-SR04) Tutorial Arduino 7 Segment Display: an Electronic Die Arduino Compile Errors Explained, With the Fixes How to Use a Breadboard: Your First Circuit Microcontroller Lab Viva Questions, With Answers Task 1: the first blink Beginner Task 3: the traffic light Intermediate Task 4: the knight rider Beginner Task 6: the night light Beginner Task 8: the thermometer Intermediate Task 9: the parking sensor Intermediate Task 10: the electronic dice Intermediate Make a free account to save your practice The project page, with the full sketch Beginner

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building free Open the editor
