---
name: "Device::USB::PCSensor::HidTEMPer::Sensor"
section: "3pm"
platform: "linux"
package: "libdevice-usb-pcsensor-hidtemper-perl"
version: "2:0.04-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Device::USB::PCSensor::HidTEMPer::Sensor"
---

# Device::USB::PCSensor::HidTEMPer::Sensor(3pm)

Generic sensor class

## NAME

Device::USB::PCSensor::HidTEMPer::Sensor - Generic sensor class

## VERSION

Version 0.0301

## SYNOPSIS

None

## DESCRIPTION

This module contains a generic class that all HidTEMPer sensors should inherit from keeping the implemented methods consistent, and making it possible to  use the same code to contact every supported device.

### CONSTANTS

- •

  MAX\_TEMPERATURE

  The highest temperature(Celsius) this sensor can detect.

- •

  MIN\_TEMPERATURE

  The lowest temperature(Celsius) this sensor can detect.

### METHODS

- •

  new( `$device` )

  Generic initializing method, creating a sensor object.

  Input parameter

  `$device` = A pre-initialized Device::USB::PCSensor::HidTEMPer::Device that the sensor is connected to. This device will be used to handle communication.

- •

  **fahrenheit()**

  Reads the current temperature and returns the corresponding value in  fahrenheit degrees.

- •

  **max()**

  Returns the highest temperature(Celsius) the sensor can detect.

- •

  **min()**

  Returns the lowest temperature(Celsius) the sensor can detect.

- •

  **celsius()**

  Empty method that should be implemented in each sensor, returing the  current degrees in celsius.

## DEPENDENCIES

This module internally includes and takes use of the following packages:

```
  use Scalar::Util qw/ weaken /;
```

This module uses the strict and warning pragmas.

## BUGS

Please report any bugs or missing features using the CPAN RT tool.

## FOR MORE INFORMATION

None

## AUTHOR

Magnus Sulland \< msulland@cpan.org \>

## ACKNOWLEDGEMENTS

Thanks to Elan Ruusamäe for fixing some compatibility issues with perl 5.8

## COPYRIGHT & LICENSE

Copyright (c) 2010-2011 Magnus Sulland

This program is free software; you can redistribute it and/or modify it  under the same terms as Perl itself.

## POD ERRORS

Hey! **The above document had some coding errors, which are explained below:**

- Around line 157:

  Non-ASCII character seen before =encoding in 'Ruusamäe'. Assuming UTF-8
