Quick Details

Property Value
Program Name agent_raspi
Agent Name raspi
File agent_raspi.cpp
Hardware Raspberry Pi Zero


The Raspberry Pi agent (aka agent_raspi) is an agent that handles communication with the Raspberry Pi, including startup, shutdown, and data transfer.

Available Agent Data

Below is a table showing which properties are collected from various other agents. This data can be viewed through the get_data request.


Agent Program Device JSON Key Description
agent_temp N/A agent_temp.active Whether or not the agent can be reached
EPS Temperature Sensor agent_temp.temp_eps Temperature of the EPS
BeagleBone Temperature Sensor agent_temp.temp_obc Temperature of the BeagleBone
Raspberry Pi Temperature Sensor agent_temp.temp_raspi Temperature of the Raspberry Pi
Battery Temperature Sensor agent_temp.temp_battery Temperature of the batteries
PyCubed Temperature Sensor agent_temp.temp_pycubed Temperature of the PyCubed
agent_sun N/A agent_sun.active Whether or not the agent can be reached
+X Sun Sensor agent_sun.ss_plusx Lux reading from the +X sun sensor
-X Sun Sensor agent_sun.ss_minusx Lux reading from the -X sun sensor
+Y Sun Sensor agent_sun.ss_plusy Lux reading from the +Y sun sensor
-Y Sun Sensor agent_sun.ss_minusy Lux reading from the -Y sun sensor
+Z Sun Sensor agent_sun.ss_plusz Lux reading from the +Z sun sensor
-Z Sun Sensor agent_sun.ss_minusz Lux reading from the -Z sun sensor
agent_pycubed N/A agent_pycubed.active Whether or not the agent can be reached
IMU Acceleration agent_pycubed.imu.accel A vector containing acceleration readings
Magnetic Field agent_pycubed.imu.mag A vector containing magnetic field readings
Angular Acceleration agent_pycubed.imu.gyro A vector containing angular acceleration readings


Usage: ssh
Aliases: command

Description: Executes a command on the Raspberry Pi through a SSH connection.

The argument command is a shell command to run on the Raspberry Pi.

Usage: ping
Aliases: is_up

Description: Checks if the Raspberry Pi can be reached.

Internally this uses the Linux ping command to check if the Raspberry Pi is detected on the local network.

If the Raspberry Pi can be reached, the request will return "UP". Otherwise, the request will return "DOWN".

Usage: shutdown_raspi
Aliases: end

Description: Attempts to shut down the Raspberry Pi

Internally this executes sudo shutdown now on the Raspberry Pi.

Note: the request name shutdown is not used, as this is reserved by COSMOS for a different purpose.

Usage: get_data
Aliases: agent_data

Description: Returns agent information as a JSON-formatted string.

This request is primarily used by the Artemis CubeSat Library on the Raspberry Pi to fetch data.



Device Property Storage Type COSMOS Name
CPU UTC double or Time device_cpu_utc_000
Temperature (K) float device_cpu_temp_000
Load float device_cpu_load_000
Memory Used (GiB) float device_cpu_gib_000
Maximum Memory (GiB) float device_cpu_maxgib_000
Up Time (s) int device_cpu_uptime_000
Boot Count int device_cpu_boot_count_000
Camera UTC double or Time device_cam_utc_000
Enabled bool device_cam_enabled_000
Image Width (Pixels) int device_cam_pwidth_000
Image Height (Pixels) int device_cam_pheight_000

Block Diagram

Below is a software diagram demonstrating the behavior of this agent Agent block diagram