Arduino UNO Q - Multi-Function Shield

Want to experiment with multiple components at once on your Arduino UNO Q? This beginner-friendly tutorial shows you how to use the Multi-Function Shield with Arduino UNO Q — step by step.

In this tutorial, you will learn:

Arduino UNO Q Multi-Function Shield

Hardware Preparation

1×Arduino UNO Q
1×USB Cable for Arduino Uno Q
1×DIYables Multi-Function Shield
1×18 kΩ Resistor (recommended, keeps the 5V pull-up of button S1 on A1 at about 3.2V)
1×Recommended: Screw Terminal Block Shield for Arduino Uno
1×Recommended: Sensors/Servo Expansion Shield for Arduino Uno
1×Recommended: Breadboard Shield for Arduino Uno
1×Recommended: Enclosure for Arduino Uno
1×Recommended: Prototyping Base Plate & Breadboard Kit for Arduino UNO

Or you can buy the following kits:

1×DIYables Sensor Kit (18 sensors/displays)
Disclosure: Some of the links provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you.
Additionally, some of these links are for products from our own brand, DIYables .

Overview of the Multi-Function Shield

The DIYables Multi-Function Shield packs multiple useful components onto one board that plugs directly into the Arduino UNO Q's MCU headers. No extra wires needed!

What's included on the shield:

  • 4-digit 7-segment display — driven via a 74HC595 shift register; shows integers, floats, text, and degree symbols
  • Three push buttons (S1, S2, S3) — active LOW with built-in pullup resistors and auto-debounce
  • Four LEDs (D1–D4) — active LOW, individually controllable; supports on/off/toggle/blink
  • Active buzzer — programmable for short beeps or timed sequences
  • Potentiometer on analog pin A0 — returns raw ADC value or percentage
  • LM35 temperature sensor on analog pin A4 — remove jumper J1 to enable

Pin mapping (same as Arduino UNO form factor):

Function MCU Pin Function MCU Pin
LED D1 D13 Button S1 A1
LED D2 D12 Button S2 A2
LED D3 D11 Button S3 A3
LED D4 D10 Potentiometer A0
Buzzer D3 LM35 Sensor A4
Display LATCH D4
Display CLOCK D7
Display DATA D8
Multi-Function Shield Pinout

Wiring Diagram

No jumper wires or breadboard needed — just align the shield with the Arduino UNO Q's MCU headers and press it into place.

The wiring diagram between Arduino UNO Q Multi-Function Shield

This image is created using Fritzing. Click to enlarge image

Note: To use the LM35 temperature sensor, remove jumper J1 on the shield (A4 is shared with I2C SDA).

WARNING

The MCU pins of the Arduino UNO Q work at 3.3V. Arduino's official pinout says they are 5V tolerant, except A0 and A1. The shield runs on 5V, and it uses exactly these two pins:

  • The potentiometer on A0 can give up to 5V. Before you stack the shield, turn its screw about 20 turns counter-clockwise, so it starts at the 0V end. Later, turn it clockwise only until MFS.readPotPercent() reaches 100%. From there on, the voltage goes above 3.3V.
  • Button S1 on A1 has a pull-up resistor to 5V (10 kΩ on most versions). Solder an 18 kΩ resistor from A1 to GND on the bottom of the shield. It keeps A1 at about 3.2V when S1 is not pressed.

Arduino UNO Q Code

The Arduino UNO Q has two processors working together:

  • The STM32 MCU drives the Multi-Function Shield directly — it controls all components via digital and analog pins
  • The Qualcomm MPU runs Debian Linux and handles Wi-Fi, Python, and cloud connectivity
  • In this section, only the MCU is programmed — the Linux side stays idle. A later section shows how both processors work together via Bridge.

Important: Always call MFS.loop() inside the Arduino loop() function. It refreshes the display, polls buttons, and manages LED blink timing and buzzer scheduling.

The sketch below cycles through display modes and responds to button presses:

/* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-multi-function-shield */ #include <DIYables_MultiFuncShield.h> uint8_t step = 0; unsigned long lastUpdate = 0; void setup() { MFS.begin(); MFS.display.print(0); } void loop() { MFS.loop(); // Must be called frequently if (millis() - lastUpdate >= 3000) { lastUpdate = millis(); switch (step) { case 0: MFS.display.print(1234); break; case 1: MFS.display.print(26.5, 1); break; case 2: MFS.display.print("HELP"); break; case 3: MFS.display.clear(); MFS.display.setChar(1, SegChars::DEGREE); MFS.display.setChar(2, 'C'); MFS.display.show(); break; } step = (step + 1) % 4; // Blink LED D1 MFS.led1.toggle(); } // Check buttons if (MFS.button1.isPressed()) { MFS.display.print(1111); MFS.buzzer.beep(100); } if (MFS.button2.isPressed()) { MFS.display.print(2222); MFS.buzzer.beep(100); } if (MFS.button3.isPressed()) { MFS.display.print(3333); MFS.buzzer.beep(100); } }

Detailed Instructions

First time with Arduino UNO Q? Follow the Getting Started with Arduino UNO Q tutorial to get your development environment ready before proceeding.

  • Connect: First do the two safety steps from the Wiring Diagram section. Then stack the Multi-Function Shield onto the Arduino UNO Q's MCU headers and plug in the USB-C cable.
  • Open Arduino App Lab: Launch Arduino App Lab and wait until it detects your Arduino UNO Q — this can take several minutes on first launch.
  • Create a new App: Click the Create New App button.
Create New App in Arduino App Lab on Arduino UNO Q
  • Give the App a name, for example: DIYables_MultiFuncShield
  • Click Create to confirm.
  • You will see a set of folders and files generated inside your new App.
Arduino App Lab App folders and files on Arduino UNO Q
  • Find the sketch/sketch.ino file — this is where you will paste the MCU sketch.
  • Paste the sketch: Copy the MCU code above and paste it into that sketch file. Keep other files as default.
    • Install the library: Click the Add sketch library button (the open book icon with a + sign) in the left sidebar.
    Add sketch library in Arduino App Lab on Arduino UNO Q
    • Search for Arduino_RouterBridge created by Arduino and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    Arduino_RouterBridge Arduino

    This library provides a simple RPC bridge for Arduino UNO Q boards, allowing communication between the board and other devices using MsgPack serialization.

    0.4.1
    Install
    More Info
    • Search for DIYables_MultiFuncShield created by DIYables.io and click the Install button.
    My Apps / DIYables Apps
    Run
    Bricks
    No bricks added...
    Sketch Libraries
    No sketch libra...
    Files
    python
    sketch
    .gitignore
    README.md
    app.yaml
    sketch.ino
    Add sketch library
    DIYables_MultiFuncShield DIYables.io

    Self-contained library for Multi-Function Shield components including 4-digit 7-segment display, buttons, LEDs, buzzer, potentiometer, and temperature sensor. No external dependencies. Uses Arduino standard APIs for compatibility across all platforms.

    1.0.0
    Install
    More Info
    • Upload: Click the Run button in Arduino App Lab to compile and upload to the STM32.
    Click Run button in Arduino App Lab on Arduino UNO Q

    The display cycles through values every 3 seconds, LED D1 blinks, and pressing S1/S2/S3 shows 1111/2222/3333 and beeps!

    • Pro Tip: The STM32 MCU on Arduino UNO Q has a 12-bit ADC (values 0–4095). The readPotPercent() function handles scaling automatically.

    Bridge: Linux + MCU

    This section shows how to program both processors of the Arduino UNO Q so the Linux side can control the Multi-Function Shield remotely:

    • The Multi-Function Shield is connected to the MCU (STM32) — the MCU controls all components directly
    • The MPU cannot access shield components directly — it must request results from the MCU via Bridge.call()
    • The MPU has Wi-Fi — running full Debian Linux, it can connect to the Internet and trigger shield actions remotely
    • Arduino_RouterBridge enables RPC communication between the two processors
    • ⚠️ /dev/ttyHS1 (Linux) and Serial1 (MCU) are RESERVED by the router — never open them in user code

    In short: MCU controls the shield components → MPU sends commands and reads sensor values → MPU can interact with the shield from anywhere over the Internet.

    Note: In the Bridge sketch, MFS.loop() is called inside the Arduino loop() to keep the display refreshed and buttons polled — this is required and does not interfere with Bridge communication.

    MCU Code (Bridge)

    /* * This Arduino UNO Q code was developed by newbiely.com * * This Arduino UNO Q code is made available for public use without any restriction * * For comprehensive instructions and wiring diagrams, please visit: * https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-multi-function-shield */ #include "Arduino_RouterBridge.h" #include <DIYables_MultiFuncShield.h> String current_display = ""; void display_number(String text) { int number = text.toInt(); current_display = text; MFS.display.print(number); Monitor.println("Display: " + text); } void display_float(String text) { float value = text.toFloat(); current_display = text; MFS.display.print(value, 1); Monitor.println("Display float: " + text); } void beep_once() { MFS.buzzer.beep(200); Monitor.println("Buzzer beeped"); } String get_buttons() { String s = ""; s += "S1:" + String(MFS.button1.isPressed() ? "pressed" : "released"); s += " S2:" + String(MFS.button2.isPressed() ? "pressed" : "released"); s += " S3:" + String(MFS.button3.isPressed() ? "pressed" : "released"); return s; } String get_pot() { // MCU STM32 has 12-bit ADC (0-4095) int raw = MFS.readPot(); float percent = MFS.readPotPercent(); return "Pot: " + String(raw) + " (" + String(percent, 1) + "%)"; } String get_status() { if (current_display == "") return "Display is blank"; return "Display shows: " + current_display; } void setup() { Bridge.begin(); Monitor.begin(9600); MFS.begin(); MFS.display.print(0); Bridge.provide_safe("display_number", display_number); Bridge.provide_safe("display_float", display_float); Bridge.provide_safe("beep_once", beep_once); Bridge.provide("get_buttons", get_buttons); Bridge.provide("get_pot", get_pot); Bridge.provide("get_status", get_status); } void loop() { MFS.loop(); // Required to refresh display and poll buttons }

    Python Code (Bridge)

    """ This Arduino UNO Q script was developed by newbiely.com This Arduino UNO Q script is made available for public use without any restriction For comprehensive instructions and wiring diagrams, please visit: https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-multi-function-shield """ from arduino.app_utils import * import time def loop(): result = Bridge.call("display_number", "1234") print(result) time.sleep(3) result = Bridge.call("display_float", "26.5") print(result) time.sleep(3) result = Bridge.call("get_buttons") print(result) result = Bridge.call("get_pot") print(result) result = Bridge.call("beep_once") print(result) time.sleep(2) result = Bridge.call("get_status") print(result) time.sleep(2) App.run(user_loop=loop)

    Detailed Instructions

    • Connect: Stack the Multi-Function Shield onto the Arduino UNO Q and plug in the USB-C cable.
    • Open Arduino App Lab: Launch Arduino App Lab and wait for the board to be detected.
    • Create a new App: Click Create New App, name it DIYables_MultiFuncShieldBridge, then click Create.
    • Paste the MCU sketch: Copy the MCU Bridge code above and paste it into sketch/sketch.ino.
    • Paste the Python code: Copy the Python Bridge code above and paste it into the Python file in the App.
    • Upload: Click the Run button in Arduino App Lab.
    Click Run button in Arduino App Lab on Arduino UNO Q

    App Lab Console Output

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    Message (Enter to send a message to "Newbiely" on usb(2820070321))
    New Line
    9600 baud
    [2026-04-29 09:00:01] Display: 1234 [2026-04-29 09:00:04] Display float: 26.5 [2026-04-29 09:00:09] Buzzer beeped
    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    [2026-04-29 09:00:01] OK [2026-04-29 09:00:04] OK [2026-04-29 09:00:07] S1:released S2:released S3:released [2026-04-29 09:00:08] Pot: 2048 (50.0%) [2026-04-29 09:00:09] OK [2026-04-29 09:00:11] Display shows: 26.5

    Telegram

    Control the Multi-Function Shield from anywhere using Telegram. Show numbers on the display, trigger the buzzer, and read sensor values from your phone.

    MCU sketch: Keep the same MCU sketch from the previous Bridge section.

    Python Code (Telegram)

    """ This Arduino UNO Q script was developed by newbiely.com This Arduino UNO Q script is made available for public use without any restriction For comprehensive instructions and wiring diagrams, please visit: https://newbiely.com/tutorials/arduino-uno-q/arduino-uno-q-multi-function-shield """ from arduino.app_utils import * import requests import time TELEGRAM_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN" CHAT_ID = "YOUR_CHAT_ID" last_update_id = 0 def get_updates(): global last_update_id url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/getUpdates" params = {"offset": last_update_id + 1, "timeout": 5} try: response = requests.get(url, params=params, timeout=10) data = response.json() if data["ok"]: return data["result"] except Exception: pass return [] def send_message(text): url = f"https://api.telegram.org/bot{TELEGRAM_TOKEN}/sendMessage" requests.post(url, data={"chat_id": CHAT_ID, "text": text}) def loop(): global last_update_id updates = get_updates() for update in updates: last_update_id = update["update_id"] message = update.get("message", {}) text = message.get("text", "") if text.startswith("/number "): number = text[8:].strip() result = Bridge.call("display_number", number) send_message(result) elif text.startswith("/float "): value = text[7:].strip() result = Bridge.call("display_float", value) send_message(result) elif text == "/beep": result = Bridge.call("beep_once") send_message(result) elif text == "/buttons": result = Bridge.call("get_buttons") send_message(result) elif text == "/pot": result = Bridge.call("get_pot") send_message(result) elif text == "/status": result = Bridge.call("get_status") send_message(result) elif text == "/start": send_message("Commands:\n/number <value> - Show integer on display\n/float <value> - Show float on display\n/beep - Trigger the buzzer\n/buttons - Read button states\n/pot - Read potentiometer value\n/status - Get display status") App.run(user_loop=loop)

    Detailed Instructions

    • Replace YOUR_TELEGRAM_BOT_TOKEN with your actual bot token from BotFather.
    • Replace YOUR_CHAT_ID with your Telegram chat ID.
    • Paste this Python code into your App's Python file (keep the same MCU sketch).
    • Click the Run button. Open Telegram and send commands to your bot.

    App Lab Console Output

    DIYables_Apps
    Stop
    sketch.ino
    1#include "Arduino_RouterBridge.h"
    Serial Monitor
    Python
    [2026-04-29 09:15:00] Waiting for Telegram messages... [2026-04-29 09:15:08] Received: /number 9999 [2026-04-29 09:15:20] Received: /pot [2026-04-29 09:15:35] Received: /beep
    Telegram
    Telegram 12:45
    Welcome to Telegram!
    ArduinoBot 10:19
    Chatting with Arduino...
    telegram-botfather
    BotFather Yesterday
    Your bot has been created.

    ArduinoBot

    bot
    Today
    /number 9999
    10:15 AM ✓✓
    OK
    10:16 AM
    /pot
    10:17 AM ✓✓
    Pot: 2048 (50.0%)
    10:18 AM
    /beep
    10:19 AM ✓✓
    OK
    10:20 AM
    /buttons
    10:21 AM ✓✓
    S1:released S2:released S3:released
    10:22 AM
    /status
    10:23 AM ✓✓
    Display shows: 9999
    10:24 AM

    OpenClaw

    You can adapt the OpenClaw to this tutorial by refering the instruction on Arduino Uno Q - OpenClaw Tutorial

    Project Ideas

    You can build many creative projects using the Multi-Function Shield with Arduino UNO Q:

    • Remote Notice Display: Send numbers or codes to the display from Telegram — useful for live score boards, countdown timers, or lab equipment status
    • Button-Triggered Alerts: When a button is pressed on the shield, the MCU sends a Telegram notification to your phone via the Bridge
    • Remote Potentiometer Reader: Read the knob position remotely via Telegram to monitor physical settings from anywhere
    • Smart Environment Monitor: Combine the LM35 sensor with the Bridge to display temperature locally and send alerts via Telegram when thresholds are crossed
    • Interactive Quiz Buzzer: Buttons S1/S2/S3 act as quiz answer buzzers — the MCU detects first press and sends the winner's button number via Telegram

    Challenge Yourself

    Ready to go further with the Multi-Function Shield on Arduino UNO Q? Try these challenges:

    • Easy: Modify the MCU sketch to display the potentiometer percentage on the 7-segment display in real time (e.g., "50.0") using MFS.readPotPercent().
    • Medium: Add a /led <1-4> <on/off> Telegram command that turns individual LEDs on or off by exposing led1 through led4 control via Bridge functions.
    • Advanced: Build a Telegram-driven quiz buzzer system: three people press S1, S2, or S3 — the MCU detects the first press, buzzes, shows the winner's number on the display, and sends a Telegram alert with the result.

    How to Connect Other Components

    The Multi-Function Shield covers all the pins of the Arduino UNO Q, and it has no female headers on top. So how can you connect other components, such as sensors, relays or motors, to the Arduino UNO Q?

    The answer is simple: put a Proto Screw Terminal Block Shield or a Screw Shield V2 between the Arduino UNO Q and the Multi-Function Shield.

    Arduino UNO Q Multi-Function Shield with Screw Shield

    The screw shield has a screw terminal for each pin. It lets you connect the Arduino UNO Q to other components. Do not use the pins that the Multi-Function Shield already uses: D3, D4, D7, D8, D10 to D13 and A0 to A3, and also A4 when you use the LM35 sensor. The free pins are D2, D5, D6, D9 and A5. D2 is free when the U4 socket (for an IR receiver) is empty. The MCU pins of the Arduino UNO Q work at 3.3V, so Step 3 powers the sensor from the 3V3 terminal.

    ※ OUR MESSAGES

    • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
    • Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!