# arm-software/cloud-iot-core-kit-examples architecture

> Architecture diagram of the GitHub repository arm-software/cloud-iot-core-kit-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arm-software/cloud-iot-core-kit-examples
- Repository: https://github.com/arm-software/cloud-iot-core-kit-examples

## Overview

This repository is a collection of Raspberry Pi IoT kit examples, not one integrated application. Its user-to-result workflows range from publishing CPU temperature to Cloud IoT, through a Pub/Sub-driven thermostat, to joystick telemetry and remote servo control. The source shows MQTT device connections, telemetry publication, configuration handling, and server-side configuration updates. The README also documents the kit setup and these example capabilities. Some peripheral utility and server relationships are only documented or have unsampled implementation details, so the graph avoids inferring links between examples.

Main entry points: [`pubsub-thermostat/pubsub_thermostat.py`](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/pubsub-thermostat/pubsub_thermostat.py) (Thermostat device), [`joystick/pubsub_stick.py`](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/pubsub_stick.py) (Joystick telemetry), [`joystick/pubsub_servo.py`](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/pubsub_servo.py) (Joystick servo), [`pubsub-thermostat/control_server.py`](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/pubsub-thermostat/control_server.py) (Thermostat controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_device_examples["Device examples"]
  node_cpu_temp["CPU temperature"]
  node_thermostat_device["Thermostat device"]
  node_stick_device["Joystick telemetry<br/>[pubsub_stick.py]"]
  node_servo_device["Joystick servo<br/>[pubsub_servo.py]"]
end

subgraph group_control_services["Cloud control"]
  node_thermostat_server["Thermostat controller<br/>[control_server.py]"]
  node_relay_server["Joystick relay<br/>[server_relay.py]"]
end

subgraph group_hardware_utilities["Hardware utilities"]
  node_photo_resistor["Photo resistor reader<br/>[photo_res.py]"]
  node_servo_sweep["Servo sweep<br/>[servo_gpio.py]"]
end

subgraph group_cloud_services["Cloud services"]
  node_mqtt_bridge{{"Cloud IoT MQTT"}}
  node_pubsub["Cloud Pub/Sub"]
  node_iot_config_api{{"Cloud IoT config API"}}
end

node_user(("Kit operator"))
node_raspberry_pi["Raspberry Pi hardware"]

node_user -->|"runs example"| node_cpu_temp
node_user -->|"runs example"| node_thermostat_device
node_user -->|"runs example"| node_thermostat_server
node_user -->|"runs example"| node_stick_device
node_user -->|"runs example"| node_servo_device
node_cpu_temp -->|"publishes telemetry"| node_mqtt_bridge
node_thermostat_device -->|"publishes telemetry"| node_mqtt_bridge
node_thermostat_device -->|"subscribes config"| node_mqtt_bridge
node_thermostat_server -->|"consumes events"| node_pubsub
node_thermostat_server -->|"updates device config"| node_iot_config_api
node_stick_device -->|"reads ADC"| node_raspberry_pi
node_stick_device -->|"publishes telemetry"| node_mqtt_bridge
node_servo_device -->|"drives PWM"| node_raspberry_pi
node_servo_device -->|"subscribes config"| node_mqtt_bridge
node_relay_server -->|"consumes events"| node_pubsub
node_relay_server -->|"updates device config"| node_iot_config_api
node_photo_resistor -->|"reads GPIO"| node_raspberry_pi
node_servo_sweep -->|"drives PWM"| node_raspberry_pi
node_thermostat_device -->|"reads sensor, drives fan"| node_raspberry_pi

click node_cpu_temp "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/CPUTemp/pi_cpu_temp_mqtt.py"
click node_thermostat_device "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/pubsub-thermostat/pubsub_thermostat.py"
click node_thermostat_server "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/pubsub-thermostat/control_server.py"
click node_stick_device "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/pubsub_stick.py"
click node_servo_device "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/pubsub_servo.py"
click node_relay_server "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/server_relay.py"
click node_photo_resistor "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/utility/photo_res.py"
click node_servo_sweep "https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/utility/servo_gpio.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cpu_temp,node_thermostat_device,node_stick_device,node_servo_device toneBlue
class node_thermostat_server,node_relay_server toneAmber
class node_photo_resistor,node_servo_sweep toneMint
class node_mqtt_bridge,node_pubsub,node_iot_config_api toneRose
class node_user,node_raspberry_pi toneIndigo
```

## Components

### Device examples

- [CPU temperature](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/CPUTemp/pi_cpu_temp_mqtt.py): `CPUTemp/pi_cpu_temp_mqtt.py`
- [Thermostat device](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/pubsub-thermostat/pubsub_thermostat.py): `pubsub-thermostat/pubsub_thermostat.py`
- [Joystick telemetry](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/pubsub_stick.py): `joystick/pubsub_stick.py`
- [Joystick servo](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/pubsub_servo.py): `joystick/pubsub_servo.py`

### Cloud control

- [Thermostat controller](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/pubsub-thermostat/control_server.py): `pubsub-thermostat/control_server.py`
- [Joystick relay](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/joystick/server_relay.py): `joystick/server_relay.py`

### Hardware utilities

- [Photo resistor reader](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/utility/photo_res.py): `utility/photo_res.py`
- [Servo sweep](https://github.com/arm-software/cloud-iot-core-kit-examples/blob/master/utility/servo_gpio.py): `utility/servo_gpio.py`

### Cloud services

- **Cloud IoT MQTT**
- **Cloud Pub/Sub**
- **Cloud IoT config API**

### Other components

- **Kit operator**
- **Raspberry Pi hardware**

## Connections

- Kit operator → CPU temperature: runs example (evidence: `readme.md`)
- Kit operator → Thermostat device: runs example (evidence: `readme.md`)
- Kit operator → Thermostat controller: runs example (evidence: `readme.md`)
- Kit operator → Joystick telemetry: runs example (evidence: `readme.md`)
- Kit operator → Joystick servo: runs example (evidence: `readme.md`)
- CPU temperature → Cloud IoT MQTT: publishes telemetry (evidence: `CPUTemp/pi_cpu_temp_mqtt.py`)
- Thermostat device → Cloud IoT MQTT: publishes telemetry (evidence: `pubsub-thermostat/pubsub_thermostat.py`)
- Thermostat device → Cloud IoT MQTT: subscribes config (evidence: `pubsub-thermostat/pubsub_thermostat.py`)
- Thermostat controller → Cloud Pub/Sub: consumes events (evidence: `pubsub-thermostat/control_server.py`)
- Thermostat controller → Cloud IoT config API: updates device config (evidence: `pubsub-thermostat/control_server.py`)
- Joystick telemetry → Raspberry Pi hardware: reads ADC (evidence: `joystick/pubsub_stick.py`)
- Joystick telemetry → Cloud IoT MQTT: publishes telemetry (evidence: `joystick/pubsub_stick.py`)
- Joystick servo → Raspberry Pi hardware: drives PWM (evidence: `joystick/pubsub_servo.py`)
- Joystick servo → Cloud IoT MQTT: subscribes config (evidence: `joystick/pubsub_servo.py`)
- Joystick relay → Cloud Pub/Sub: consumes events (evidence: `joystick/server_relay.py`)
- Joystick relay → Cloud IoT config API: updates device config (evidence: `joystick/server_relay.py`)
- Photo resistor reader → Raspberry Pi hardware: reads GPIO (evidence: `utility/photo_res.py`)
- Servo sweep → Raspberry Pi hardware: drives PWM (evidence: `utility/servo_gpio.py`)
- Thermostat device → Raspberry Pi hardware: reads sensor, drives fan (evidence: `pubsub-thermostat/pubsub_thermostat.py`)
