Arduino UNO Q - GUVA-S12SD UV Sensor

You cannot see ultraviolet light, but your skin keeps the score. A cloudy summer noon can still burn you, while a bright winter morning may be harmless. The GUVA-S12SD UV sensor turns that invisible UV into a small voltage, so a board can put a number on it. The Arduino UNO Q is a good partner here: its STM32 MCU samples the sensor, and its Linux side can share the result with Python or warn you on Telegram when it is time for sunscreen.

On this page you will find:

Arduino UNO Q GUVA-S12SD UV Sensor

Hardware Preparation

1×Arduino UNO Q
1×USB Cable for Arduino Uno Q
1×GUVA-S12SD UV Sensor Module
1×Jumper Wires
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 GUVA-S12SD UV Sensor

GUVA-S12SD UV sensor module pinout
image source: diyables.io

The DIYables GUVA-S12SD module is a little purple board, roughly 11mm x 27mm, with two mounting holes and a presoldered header. Look for the tiny white square: that is the GUVA-S12SD UV photodiode. When UV light lands on it, it lets through a very small current. That current is far too weak to read on its own, so a VLM358 op-amp next to it turns it into a voltage on the SIG pin. The MCU of the UNO Q reads that voltage with analogRead(). That is the whole idea — more UV, more volts. You get two modules in one pack.

Item Value
Sensor chip GUVA-S12SD UV photodiode
Amplifier VLM358 op-amp
Light it reacts to UV-A and UV-B, 240nm to 370nm
Viewing angle 130 degrees
Supply voltage 2.5V to 5V DC
Output Analog voltage, about 0V (no UV) to about 1V+ (strong sun)
Board size about 11mm x 27mm

The three pins are printed on the board as SIG, GND, VCC:

  • SIG: the analog output. Wire it to an analog input of the MCU (A0 on this page)
  • GND: goes to any GND pin of the Arduino UNO Q
  • VCC: power. On the UNO Q, feed it from 3.3V so that SIG can never go above what the MCU pins accept

※ NOTE THAT:

Do not test it under the desk lamp. Normal room light and LED bulbs hold almost no UV, so indoors the sensor sits close to 0V. That is correct behavior, not a broken module. Take it to a window that is open, or better, outside in the sun. A UV flashlight also works for a quick check.

From voltage to UV index. Most makers use one simple rule for this module: every 0.1V on SIG is about one point of UV index, so UV index ≈ voltage / 0.1. It is an approximation for hobby use. It is good for "is the sun strong right now?", but it is not a calibrated meter. The UV index scale from the WHO splits the numbers into five levels:

UV Index Level What to do
0 to 2 Low no special care needed
3 to 5 Moderate shade around noon, a hat helps
6 to 7 High sunscreen, hat and sunglasses
8 to 10 Very High avoid the midday sun
11+ Extreme stay inside in the middle of the day

The UNO Q side of the math. The STM32 MCU reads analog pins with a 12-bit ADC and a 3.3V reference, so analogRead() returns 0 to 4095. The sketches call analogReadResolution(12) to make sure of that range. To get volts back: voltage = raw × 3.3 / 4095. One step is only about 0.8mV, which is plenty for a signal that rarely goes above 1V.

Wiring Diagram

Just three jumper wires go from the sensor to the board. SIG lands on A0, and the module takes its power from the 3.3V header pin.

The wiring diagram between Arduino UNO Q GUVA-S12SD UV sensor

This image is created using Fritzing. Click to enlarge image

UV Sensor Pin Arduino UNO Q
SIG A0
GND GND
VCC 3.3V

※ NOTE THAT:

Point the white photodiode up at the sky and keep it free of glass. Ordinary window glass blocks most UV-B, so a sensor behind a closed window reads lower than one outside.

How To Program For GUVA-S12SD UV Sensor

No library is needed. The sensor is a plain analog voltage, so the work is a few lines of math:

  1. Set the ADC to 12-bit, once, in setup():
analogReadResolution(12); // analogRead() now gives 0 ... 4095
  1. Read the SIG pin with analogRead():
int raw = analogRead(A0);
  1. Turn the raw number into volts, using the 3.3V reference of the MCU:
float sig_volt = raw * 3.3 / 4095.0;
  1. Estimate the UV index (about 0.1V per point), then pick the level name from the table above:
float uv_index = sig_volt / 0.1; if (uv_index >= 6.0) { /* High or worse: time for sunscreen */ }

Arduino UNO Q Code

Before the code, a quick reminder of who does what on this board:

  • The STM32 MCU owns pin A0, so every UV sample is taken there
  • The Qualcomm MPU runs Debian Linux, Python and the Wi-Fi link
  • Both examples below are MCU-only sketches. Linux joins in later, in the Bridge section

Example 1 - Raw ADC Value and SIG Voltage

A first sanity check. Once a second, the sketch prints the number from the ADC and the voltage it stands for. Indoors you should see tiny values. Outside they should jump.

/* * 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-guva-s12sd-uv-sensor */ // Arduino UNO Q - GUVA-S12SD UV Sensor: print the raw ADC value and the SIG voltage // Wiring: UV sensor SIG -> A0, GND -> GND, VCC -> 3.3V // The STM32 MCU of the UNO Q reads analog pins with a 3.3V reference. #define UV_SIG_PIN A0 // The Arduino UNO Q pin connected to the SIG pin of the sensor #define ADC_REF_VOLT 3.3 // reference voltage of the MCU ADC #define ADC_MAX_VALUE 4095.0 // 12-bit ADC: 0 to 4095 void setup() { Serial.begin(115200); delay(1500); analogReadResolution(12); // ask for the full 12-bit range (0-4095) Serial.println("Arduino UNO Q GUVA-S12SD raw test started"); } void loop() { int raw = analogRead(UV_SIG_PIN); // 0 ... 4095 float sig_volt = raw * ADC_REF_VOLT / ADC_MAX_VALUE; // 0.000 ... 3.300 V Serial.print("ADC: "); Serial.print(raw); Serial.print(" | SIG: "); Serial.print(sig_volt, 3); Serial.println(" V"); delay(1000); // one line per second }

Detailed Instructions

Never used the Arduino UNO Q before? Read Getting Started with Arduino UNO Q first. It shows how to install Arduino App Lab.

  • Wiring: SIG to A0, GND to GND, VCC to 3.3V, just like the diagram.
  • USB: Plug the Arduino UNO Q into your computer with the USB-C cable.
  • App Lab: Open Arduino App Lab and wait until the board shows up.
  • New App: Click Create New App.
Create New App in Arduino App Lab on Arduino UNO Q
  • Type GuvaS12sdRaw as the name and click Create.
Arduino App Lab App folders and files on Arduino UNO Q
  • Code: Open sketch/sketch.ino and replace everything in it with the code above. You do not need to install a library or change other files.
  • Run: Press the Run button.
Click Run button in Arduino App Lab on Arduino UNO Q
  • Test: Leave the board on your desk for a few lines, then carry the sensor (on a long USB cable or a laptop) to an open window or outside.

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-10-24 11:47:05] Arduino UNO Q GUVA-S12SD raw test started [2026-10-24 11:47:06] ADC: 9 | SIG: 0.007 V [2026-10-24 11:47:07] ADC: 14 | SIG: 0.011 V [2026-10-24 11:47:08] ADC: 11 | SIG: 0.009 V [2026-10-24 11:47:31] ADC: 248 | SIG: 0.200 V [2026-10-24 11:47:32] ADC: 446 | SIG: 0.359 V [2026-10-24 11:47:33] ADC: 794 | SIG: 0.640 V [2026-10-24 11:47:34] ADC: 802 | SIG: 0.646 V

The first three lines are from the desk: almost nothing. The jump starts at the open door, and the last two lines are in full noon sun. If the value never leaves the low teens, even outdoors, check the SIG wire on A0.

Example 2 - UV Index and Risk Level

Now the voltage becomes something a person understands. The sketch takes 16 quick readings and averages them, so a single noisy sample does not make the number jump. It then divides by 0.1 to get the UV index and prints the WHO level name next to it.

/* * 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-guva-s12sd-uv-sensor */ // Arduino UNO Q - GUVA-S12SD UV Sensor: estimate the UV index and its level // Wiring: UV sensor SIG -> A0, GND -> GND, VCC -> 3.3V // Rule of thumb for this module: UV index = SIG voltage / 0.1 (about 0.1V per UV index point). // This is an estimate for hobby projects, not a calibrated UV meter. #define UV_SIG_PIN A0 #define ADC_REF_VOLT 3.3 #define ADC_MAX_VALUE 4095.0 // 12-bit ADC #define SAMPLE_COUNT 16 // readings averaged per result, to calm the noise // Read the pin several times and return the average voltage float read_uv_voltage() { long sum = 0; for (int i = 0; i < SAMPLE_COUNT; i++) { sum += analogRead(UV_SIG_PIN); delay(2); } float avg_raw = (float)sum / SAMPLE_COUNT; return avg_raw * ADC_REF_VOLT / ADC_MAX_VALUE; } // WHO scale: 0-2 Low, 3-5 Moderate, 6-7 High, 8-10 Very High, 11+ Extreme const char* uv_level(float uv_index) { if (uv_index < 3.0) return "Low"; if (uv_index < 6.0) return "Moderate"; if (uv_index < 8.0) return "High"; if (uv_index < 11.0) return "Very High"; return "Extreme"; } void setup() { Serial.begin(115200); delay(1500); analogReadResolution(12); Serial.println("Arduino UNO Q GUVA-S12SD UV index meter started"); } void loop() { float sig_volt = read_uv_voltage(); float uv_index = sig_volt / 0.1; Serial.print("SIG: "); Serial.print(sig_volt, 3); Serial.print(" V -> UV index: "); Serial.print(uv_index, 1); Serial.print(" ("); Serial.print(uv_level(uv_index)); Serial.println(")"); delay(1000); }

Detailed Instructions

  • Keep the same wiring.
  • Create an App called GuvaS12sdUvIndex (or reuse the one from Example 1), paste this code into sketch/sketch.ino, and click Run.
  • Watch the level name change as you move the sensor from shade into direct sun.

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-10-24 12:15:40] Arduino UNO Q GUVA-S12SD UV index meter started [2026-10-24 12:15:41] SIG: 0.012 V -> UV index: 0.1 (Low) [2026-10-24 12:15:42] SIG: 0.013 V -> UV index: 0.1 (Low) [2026-10-24 12:16:05] SIG: 0.247 V -> UV index: 2.5 (Low) [2026-10-24 12:16:09] SIG: 0.381 V -> UV index: 3.8 (Moderate) [2026-10-24 12:16:14] SIG: 0.652 V -> UV index: 6.5 (High) [2026-10-24 12:16:15] SIG: 0.668 V -> UV index: 6.7 (High) [2026-10-24 12:16:22] SIG: 0.832 V -> UV index: 8.3 (Very High)

A reading of 2.5 under a tree and 6.5 a few steps away in the open is normal. Shade cuts UV a lot, which is exactly why the level name is useful.

Bridge: Linux + MCU

The UV sensor only gives data, it takes no commands. So data moves one way: from the MCU up to Linux. Here is the plan:

  • The MCU does the sampling. Every 500 ms it averages 16 readings of A0 and stores the voltage and the UV index
  • It offers three read-only values through Bridge.provide():
    • get_uv_voltage — the averaged SIG voltage, like 0.640
    • get_uv_index — the estimated UV index with one decimal, like 6.4
    • get_uv_level — the level name: Low, Moderate, High, Very High or Extreme
  • Python asks for them with Bridge.call() every 2 seconds and prints one line. It adds a note when the level name changes
  • The answers are instant. The MCU returns the stored numbers, so a Bridge call never waits for the ADC
  • ⚠️ /dev/ttyHS1 (Linux) and Serial1 (MCU) are RESERVED by the router — never open them in your code

In short: the sun hits the photodiode → the MCU averages A0 → Python calls get_uv_index → Linux has the number.

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-guva-s12sd-uv-sensor */ // Arduino UNO Q - GUVA-S12SD UV Sensor, shared with Linux via Bridge // Wiring: UV sensor SIG -> A0, GND -> GND, VCC -> 3.3V // The MCU samples the sensor every 500 ms and keeps the latest result. // Python on Linux only reads these values. It never touches the pin. #include "Arduino_RouterBridge.h" #define UV_SIG_PIN A0 #define ADC_REF_VOLT 3.3 #define ADC_MAX_VALUE 4095.0 #define SAMPLE_COUNT 16 float uv_voltage = 0.0; // averaged SIG voltage, in volts float uv_index = 0.0; // estimated UV index (voltage / 0.1) unsigned long last_sample_ms = 0; const char* uv_level(float index) { if (index < 3.0) return "Low"; if (index < 6.0) return "Moderate"; if (index < 8.0) return "High"; if (index < 11.0) return "Very High"; return "Extreme"; } void sample_uv() { long sum = 0; for (int i = 0; i < SAMPLE_COUNT; i++) { sum += analogRead(UV_SIG_PIN); delay(2); } uv_voltage = ((float)sum / SAMPLE_COUNT) * ADC_REF_VOLT / ADC_MAX_VALUE; uv_index = uv_voltage / 0.1; } // Read-only values for Python String get_uv_voltage(String arg) { return String(uv_voltage, 3); } String get_uv_index(String arg) { return String(uv_index, 1); } String get_uv_level(String arg) { return String(uv_level(uv_index)); } void setup() { Bridge.begin(); Monitor.begin(); analogReadResolution(12); sample_uv(); Bridge.provide("get_uv_voltage", get_uv_voltage); Bridge.provide("get_uv_index", get_uv_index); Bridge.provide("get_uv_level", get_uv_level); Monitor.println("Arduino UNO Q GUVA-S12SD Bridge ready"); } void loop() { if (millis() - last_sample_ms >= 500) { last_sample_ms = millis(); sample_uv(); } }

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-guva-s12sd-uv-sensor """ from arduino.app_utils import * import time # Linux side: every 2 seconds, ask the MCU for the UV reading and print it. # A short extra line is printed whenever the UV level name changes. last_level = None def loop(): global last_level voltage = str(Bridge.call("get_uv_voltage")) # e.g. "0.640" index = str(Bridge.call("get_uv_index")) # e.g. "6.4" level = str(Bridge.call("get_uv_level")) # e.g. "High" print(f"UV index {index} ({level}), SIG {voltage} V") if last_level is not None and level != last_level: print(f"Level changed: {last_level} -> {level}") last_level = level time.sleep(2) App.run(user_loop=loop)

Detailed Instructions

  • New App: In Arduino App Lab, click Create New App and call it GuvaS12sdBridge.
  • MCU part: Put the MCU code into sketch/sketch.ino and add the Bridge library:
  • 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
  • Linux part: Put the Python code into the Python file of the same App.
  • Run: Click the Run button.
  • Take it outside: Move the sensor from the room to the sunlight and look at the Python console.

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-10-24 13:02:10] Arduino UNO Q GUVA-S12SD Bridge ready
DIYables_Apps
Stop
sketch.ino
1#include "Arduino_RouterBridge.h"
Serial Monitor
Python
[2026-10-24 13:02:11] UV index 0.1 (Low), SIG 0.010 V [2026-10-24 13:02:13] UV index 0.1 (Low), SIG 0.011 V [2026-10-24 13:02:35] UV index 4.2 (Moderate), SIG 0.423 V [2026-10-24 13:02:35] Level changed: Low -> Moderate [2026-10-24 13:02:37] UV index 5.9 (Moderate), SIG 0.587 V [2026-10-24 13:02:39] UV index 6.3 (High), SIG 0.631 V [2026-10-24 13:02:39] Level changed: Moderate -> High

The MCU Monitor stays quiet after its "ready" line on purpose. All the reporting happens on the Linux side, where the values can go to a file, a web page or the Internet.

Telegram

Put the sensor on a balcony or a garden pole and let the UNO Q watch the sky for you. The bot answers /uv at any time. When the UV index reaches 6 (High), it sends you a "use sunscreen" message by itself.

Command What it does
/uv current UV index and level
/start turn on high-UV alerts for this chat
/stop turn off high-UV alerts for this chat

How the alert stays polite:

  • It goes only to chats that sent /start, so you do not need to find your chat ID
  • After one alert, the bot waits 30 minutes before it sends the next one, even if the UV stays high. On a sunny day you get a reminder every half hour, not one every second
  • Change UV_ALERT_INDEX or ALERT_COOLDOWN_S at the top of the script if you want a different limit or pause

MCU sketch: Keep the MCU sketch from the Bridge section as it is.

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-guva-s12sd-uv-sensor """ from arduino.app_utils import * import requests import time # Sun-safety bot for the GUVA-S12SD UV sensor. # /uv answers with the current UV index and level. # Chats that sent /start get an automatic alert when the UV index reaches 6 or more. # Keep the MCU sketch from the Bridge section. TELEGRAM_BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN" API_URL = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}" UV_ALERT_INDEX = 6.0 # 6 and above = High on the WHO scale ALERT_COOLDOWN_S = 30 * 60 # at most one alert every 30 minutes last_update_id = 0 last_alert_time = 0 subscribers = set() # chats that receive the automatic alert HELP_TEXT = ( "Arduino UNO Q UV Sensor Bot\n" "/uv - current UV index and level\n" "/start - turn on high-UV alerts for this chat\n" "/stop - turn off high-UV alerts" ) def get_updates(): try: resp = requests.get(f"{API_URL}/getUpdates", params={"offset": last_update_id + 1, "timeout": 1}, timeout=5) data = resp.json() if data.get("ok"): return data["result"] except Exception as e: print(f"Error getting updates: {e}") return [] def send_message(chat_id, text): try: requests.post(f"{API_URL}/sendMessage", data={"chat_id": chat_id, "text": text}, timeout=10) except Exception as e: print(f"Error sending message: {e}") def read_uv(): index = float(str(Bridge.call("get_uv_index"))) level = str(Bridge.call("get_uv_level")) return index, level def handle(chat_id, text): if text == "/start": subscribers.add(chat_id) return "High-UV alerts are ON for this chat.\n\n" + HELP_TEXT if text == "/stop": subscribers.discard(chat_id) return "High-UV alerts are OFF for this chat." if text == "/uv": index, level = read_uv() return f"UV index: {index:.1f} ({level})" return HELP_TEXT def loop(): global last_update_id, last_alert_time # 1. Automatic alert, limited by the cooldown so it does not spam try: index, level = read_uv() now = time.time() if index >= UV_ALERT_INDEX and now - last_alert_time >= ALERT_COOLDOWN_S: last_alert_time = now alert = f"UV alert: index {index:.1f} ({level}). Use sunscreen, a hat and sunglasses." print(alert) for chat_id in subscribers: send_message(chat_id, alert) except ValueError: pass # 2. Answer commands (getUpdates waits up to 1 second, which also paces the loop) for update in get_updates(): last_update_id = update["update_id"] if "message" not in update: continue chat_id = update["message"]["chat"]["id"] text = update["message"].get("text", "").strip().lower() print(f"Received: {text}") send_message(chat_id, handle(chat_id, text)) App.run(user_loop=loop)

Detailed Instructions

  • Token: Create a bot with @BotFather and paste its token into TELEGRAM_BOT_TOKEN. New to this? See How to Create a Telegram Bot.
  • Script: In the GuvaS12sdBridge App, swap the Python code for the bot script. The sketch does not change.
  • Run: Click the Run button.
  • Sign up: Open the chat with your bot and send /start.
  • Check: Send /uv. Then put the sensor in the midday sun and wait for the alert.
  • Remember: The list of chats is kept in memory only. Send /start again after you restart the App.

App Lab Console Output

DIYables_Apps
Stop
sketch.ino
1#include "Arduino_RouterBridge.h"
Serial Monitor
Python
[2026-10-24 12:30:02] Received: /start [2026-10-24 12:30:20] Received: /uv [2026-10-24 12:41:57] UV alert: index 6.4 (High). Use sunscreen, a hat and sunglasses. [2026-10-24 12:55:13] Received: /uv [2026-10-24 13:11:58] UV alert: index 7.1 (High). Use sunscreen, a hat and sunglasses.
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
/start
10:15 AM ✓✓
High-UV alerts are ON for this chat.
10:16 AM
/uv
10:17 AM ✓✓
UV index: 4.6 (Moderate)
10:18 AM
UV alert: index 6.4 (High). Use sunscreen, a hat and sunglasses.
10:19 AM
/uv
10:20 AM ✓✓
UV index: 6.9 (High)
10:21 AM
UV alert: index 7.1 (High). Use sunscreen, a hat and sunglasses.
10:22 AM

Look at the times: the second alert came 30 minutes after the first one, even though the UV was high the whole time. That is the cooldown at work.

OpenClaw

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

Project Ideas

Some ways to put a UV number to work with the UNO Q:

  • Beach Bag Sun Guard: A battery pack, the UNO Q and the sensor in a clear box. Telegram tells the whole family when to put on sunscreen again.
  • Daily UV Diary: Python saves the UV index to a CSV file every minute. In the evening it draws the curve of the day and finds the peak hour.
  • Smart Window Blind: When the UV level reaches High, the MCU drives a servo or motor to lower the blind and protect plants or furniture.
  • UV Lamp Tester: Hold a UV curing lamp or a UV LED over the sensor and see if it still gives the same reading as when it was new.
  • Weather Station Add-on: Add the UV index next to temperature and humidity on a small web page served from the Linux side.

Challenge Yourself

Give these a try:

  • Easy: In Example 2, keep the highest UV index seen since power-on and print it at the end of each line.
  • Medium: Add a fourth Bridge value, get_uv_peak, that returns the highest UV index of the day. Add a /peak command to the Telegram bot that reads it.
  • Advanced: Make a sunscreen timer. After the first alert, start a 2-hour timer in Python. If the UV is still High or worse when it ends, send "Time to put on sunscreen again".

Function References

※ 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!