You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Noccy 5b46f454c2
Initial commit of migrated code from noccylabs/acpi-thermal
8 years ago
examples Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago
lib Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago
tests Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago
.gitignore Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago
LICENSE Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago
README.md Initial commit 8 years ago
composer.json Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago
phpunit.xml Initial commit of migrated code from noccylabs/acpi-thermal 8 years ago

README.md

ACPI Thermal

Read the temperature readings from the ACPI sysfs

Installation

    $ composer require noccylabs/acpi-thermal:0.1.*

Usage

You can get a collection of all the available thermal zones using the static getAllZones() method:

    use NoccyLabs\Thermal;

    $zones = Thermal\Zone::getAllZones();
    foreach ($zones as $zone) {
        printf("%s = %.1fºC\n",
            $zone->getName(),
            $zone->getTemp()
        );
    }

You can also create a zone directly and start reading from it (assuming it exists):

    $zone = new Thermal\Zone("thermal_zone0");        
    echo $zone->getTemp();