0.3.0 • Published 1 year ago

raspberrypi-sys-info v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Raspberry PI System Info

This project is an npm library for extracting various metrics from Raspberry Pi.

Table of Contents

Installation

To use this library in your project, you need to install it via npm. Make sure you have Node.js and npm installed.

npm i raspberrypi-sys-info

Usage

Below is an example of how to use the library to fetch and display various metrics from a Raspberry Pi.

Example Code

import { getCpuTemperature, getGpuTemperature } from 'raspberrypi-sys-info';

async function displaySystemInfo() {
    try {
        const cpuTemp = await getCpuTemperature();
        console.log(`CPU Temperature: ${cpuTemp}°C`);

        const gpuTemp = await getGpuTemperature();
        console.log(`GPU Temperature: ${gpuTemp}°C`);

    } catch (error) {
        console.error(error.message);
    }
}

displaySystemInfo();

Functions

getCPUTemperature()

Returns the CPU temperature in degrees Celsius.

getGpuTemperature()

Returns the GPU temperature in degrees Celsius.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License.

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago