This guide provides step-by-step instructions to set up the Arduino Uno Q hardware and integrate it with /IOTCONNECT, Avnet's robust IoT platform to run IoT-connected Arduino App Lab demos.
- Install Arduino App Lab on Host Machine
- Clone This Repo Onto Your Arduino UNO Q
- Onboard Arduino into /IOTCONNECT
- Set Up /IOTCONNECT SDK and Relay Service
- Choose a Lab Example, Clone It, and Copy the /IOTCONNECT Files
- Run the App and Confirm Telemetry
First, install Arduino App Lab on your PC:
Then, connect the UNO Q to your PC with a USB cable.
Next, enter your Wi-Fi credentials and set up connectivity.
Update the board when prompted.
Now, restart the board.
Then, in App Lab, open Examples to view all available apps.
Finally, open the App Lab terminal (used to access the Uno Q terminal).
Run these commands to clone this repository onto your Arduino to get access to the automation scripts and App Lab code:
Tip
Users can paste into the Arduino App Lab terminal using RIGHT-CLICK. Using CTRL+V is not supported in the App Lab Terminal.
sudo mkdir -p /opt/demo && sudo chown $USER /opt/demo && \
git clone https://github.com/avnet-iotconnect/iotc-arduino-uno-q-workshop.git /home/arduino/iotc-arduino-uno-q-workshop && \
chmod +x /home/arduino/iotc-arduino-uno-q-workshop/scripts/*.shNext you will need to onboard your device into /IOTCONNECT. This will be done via the online /IOTCONNECT user interface in conjunction with an automated bash script. Follow these steps to complete the process:
-
In a web browser, navigate to console.iotconnect.io and log into your account.
-
In the blue toolbar on the left edge of the page, hover over the "processor" icon and then in the resulting dropdown select "Device".
-
Now in the resulting Device page, click on the "Templates" tab of the blue toolbar at the bottom of the screen.
-
Right-click and then click "save link as" on this link to the Arduino Uno Q App Lab device template to download the raw template file to your PC.
Important
Ensure that the template file saves as a .json file-type. Some browsers will default to a .txt file-type
which is not supported by the /IOTCONNECT template import feature.
-
Back in the /IOTCONNECT browser tab, click on the "Create Template" button in the top-right of the screen.
-
Click on the "Import" button in the top-right of the resulting screen.
-
Select your downloaded copy of the template from sub-step 4 and then click "save".
-
Click on the "Devices" tab of the blue toolbar at the bottom of the screen.
-
In the resulting page, click on the "Create Device" button in the top-right of the screen.
-
Customize the "Unique ID" and "Device Name" fields to your needs (both fields should be identical though).
-
Select the most appropriate option for your device from the "Entity" dropdown (only for organization, does not affect connectivity).
-
Select "arduino" from the "Template" dropdown.
-
In the resulting "Device Certificate" field, select "Use my certificate." Leave this page as-is for now, you will finish it later.
-
Execute the automated device credentials script with this command:
bash /home/arduino/iotc-arduino-uno-q-workshop/scripts/credentials.sh
-
If you generated a new certificate, when prompted, press ENTER to print it.
If you chose to reuse existing credentials, the script may skip certificate reprint. -
Copy (using CTRL+C) the device certificate text (including BEGIN and END lines) and paste the text into the certificate box in the /IOTCONNECT device creation page.
-
Click the "Save and View" button to go to the page for your new device.
-
Now on your device's page in /IOTCONNECT, click on the black/white/green paper-and-cog icon in the top-right of the device page (just above "Connection Info") to download your device's configuration file.
-
Open the configuration file in a text editor and copy its entirety to your clipboard.
-
Back in the terminal of your Arduino, paste (using RIGHT-CLICK, because CTRL+V does not work in the App Lab Terminal) the contents (of the configuration file from your clipboard as instructed by the next step of the script, and then press ENTER.
-
The onboarding process is complete.
Run this command to install the /IOTCONNECT Python Lite SDK and then download and configure the /IOTCONNECT Relay Service.
sudo /home/arduino/iotc-arduino-uno-q-workshop/scripts/unoq_setup.shNote
If during the setup script a pop-up appears asking if you would like to restart select device services, simply press ENTER.
In Arduino App Lab:
- Browse the example applications after clicking "Examples" in the vertical toolbar on the left.
- Click on the example application you wish to utilize.
- Click on "Copy and edit app" in the top-right corner
- Name your copy of the app (ideally similar to the app names in this repo)
- Copy the /IOTCONNECT-enabled python files and relay client from the workshop repo into the app:
cp /home/arduino/iotc-arduino-uno-q-workshop/app-configs/<example>/python/* /home/arduino/ArduinoApps/<APP_LAB_FOLDER>/python/ && \ cp /opt/demo/iotc_relay_client.py /home/arduino/ArduinoApps/<APP_LAB_FOLDER>/python/
Tip
For example, if you were using the "blink" app and you had named your copy "my-blink-app", your commands would be:
cp /home/arduino/iotc-arduino-uno-q-workshop/app-configs/blink/python/* /home/arduino/ArduinoApps/my-blink-app/python/ && \
cp /opt/demo/iotc_relay_client.py /home/arduino/ArduinoApps/my-blink-app/python/Use these /IOTCONNECT-specific guides:
Note
[DB] = dashboard image and exported /IOTCONNECT dashboard JSON template available in the example's folder.
[AH] = additional hardware (not provided with standard Arduino Uno Q) is required for this app.
- air-quality-monitoring
[DB] - anomaly-detection
- audio-classification
[DB] - bedtime-story-teller
- blink
- blink-with-ui
- cloud-blink
- code-detector
[AH] - home-climate-monitoring-and-storage
[DB][AH] - image-classification
[DB] - keyword-spotting
[AH] - led-matrix-painter
- mascot-jump-game
- object-detection
[DB] - object-hunting
[AH] - real-time-accelerometer
[DB][AH] - system-resources-logger
[DB] - theremin
[AH] - unoq-pin-toggle
- vibration-anomaly-detection
[DB][AH] - video-face-detection
[DB][AH] - video-generic-object-detection
[DB][AH] - video-person-classification
[DB][AH] - weather-forecast
- Run the app in App Lab.
- Confirm telemetry appears in /IOTCONNECT.
- If you enabled commands, test a command from /IOTCONNECT and verify the app receives it.
Expected result: the selected App Lab example runs on the UNO Q and publishes telemetry to /IOTCONNECT.
Tip
You can manually manage the /IOTCONNECT Relay Service on your device.
To disconnect your device from /IOTCONNECT, stop the relay service:
sudo systemctl stop iotc-relayTo start it again:
sudo systemctl start iotc-relayTo restart:
sudo systemctl restart iotc-relayIf telemetry does not show up and logs report Address already in use, check what is bound to TCP port 8899:
sudo ss -ltnp | grep ':8899'If a conflicting bridge service is using that port (for example iotc-socat), stop it and restart relay:
sudo systemctl disable --now iotc-socat
sudo systemctl restart iotc-relay



