Weather & UV Safety Station with Calliope Mini

In this project, learners explore weather conditions and UV exposure using the Calliope Mini to collect real data such as temperature and UV levels. They program the device to display safety alerts that help guide everyday decisions, like outdoor play or clothing choices. We have included extra challenges that encourage learners to experiment with different locations, times of day, and alert designs, making learning fun and engaging. Through this hands-on experience, learners build problem-solving, data interpretation, and health awareness skills, while discovering how coding, robotics and smart technologies support safe and informed choices.

ItemPurpose
Calliope Mini V3Main microcontroller that runs the weather program
DHT11 SensorMeasures temperature and humidity
UV SensorDetects UV intensity from sunlight or UV lamp
Jumper WiresConnect sensors to the Calliope Mini
External Battery Pack (optional)Powers the Calliope outdoors
USB CableFor coding and uploading the program

Here’s how different components connect
DHT11 Sensor

  • VCC → connects to Calliope 3V

  • GND → connects to Calliope GND

  • DATA → connects to Calliope Pin 0 (P0)

UV Sensor

  • OUT → connects to Calliope P1

  • VCC →  connects to Calliope 3V

  • GND → connects to Calliope GND

This setup allows the Calliope Mini to receive temperature, humidity, and UV readings. The LED matrix will display messages such as “HOT,” “COOL,” or “UV HIGH,” and the station can warn users when UV levels become unsafe.

Follow these steps carefully to open and explore the project in MakeCode for Calliope Mini:

Plug in your Calliope Mini to your computer using a USB cable, then follow the steps in the video to upload your code and bring your project to life!

BlockWhat it Does
set temperature to 0Creates a variable to store the temperature value.
set humidity to 0Creates a variable to store the humidity value.
set uvValue to 0Creates a variable to store the UV sensor reading.
foreverRepeats the blocks inside all the time so the Calliope Mini keeps checking the sensors.
DHT11 → temperatureReads the temperature from the DHT11 sensor connected to Pin P0.
DHT11 → humidityReads the humidity from the DHT11 sensor connected to Pin P0.
analog read pin P1Reads the UV sensor value from Pin P1.
show string "T:"Displays the letter T to show temperature is coming next.
show number temperatureDisplays the temperature value on the LED matrix.
show string "C"Shows C to mean degrees Celsius.
show string "H:"Displays the letter H to show humidity is coming next.
show number humidityDisplays the humidity value on the LED matrix.
show string "%"Shows the percent symbol for humidity.
show string "UV:"Displays UV to show the UV value is coming next.
show number uvValueDisplays the UV sensor reading on the LED matrix.
pause 1000 msWaits 1 second before repeating the process again.

  • Temperature shows 0°C or 1°C?
    The DHT11 may not be connected correctly, check the signal wire.

  • UV reading always low?
    Test the sensor under sunlight or a bright UV lamp.

  • Calliope freezes or restarts?
    Avoid touching exposed wires — short circuits may reset the board.

  • Humidity values look strange (0% or 255%)?
    Ensure the sensor pin is firmly connected to P0.

  • How to read environmental data with sensors

  • How weather stations measure temperature, humidity, and UV

  • How to display messages on the Calliope LED matrix

  • How conditions and safety alerts work in real systems

  • How coding and electronics combine to solve everyday problems

  • Add a Green/Yellow/Red LED system to show UV safety visually.

  • Create a sunburn timer that counts down based on UV intensity.

  • Log temperature, humidity, and UV readings to a CSV file using MakeCode data logging.

  • Build a cardboard weather station tower and mount your Calliope on it.

  • Add a buzzer alarm when humidity drops (very dry) or rises (rain warning).

Use Edge Impulse to build, train, and deploy machine learning (ML) model to make their weather project smart and interactive. The AI learns from temperature and UV readings and recognizes when conditions are safe or dangerous.

For example:

  • Weather Predictor: The Calliope Mini observes patterns in the data and learns what counts as hot, cold, or high UV.
  • Safety Alerts: When the AI predicts extreme conditions, it can display a warning message, flash a light, or play a short sound to alert students.
  • Fun Test Game: Students can test the AI by placing the device in different spots (sunny, shady, indoors) and see if it guesses the conditions correctly.