Go to file
2015-01-23 19:15:07 +01:00
examples Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
lib Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
tests Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
.gitignore Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
composer.json Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
LICENSE Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
phpunit.xml Initial commit of migrated code from noccylabs/acpi-thermal 2015-01-23 19:15:07 +01:00
README.md Initial commit 2015-01-23 19:02:10 +01:00

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();