device::usb::pcsensor::hidtemper::ntc::internal(3pm) [debian man page]
Device::USB::PCSensor::HidTEMPer::NTC::Internal(3pm) User Contributed Perl Documentation Device::USB::PCSensor::HidTEMPer::NTC::Internal(3pm)
Device::USB::PCSensor::HidTEMPer::NTC::Internal - The HidTEMPerNTC internal sensor
VERSION
Version 0.02
SYNOPSIS
None
DESCRIPTION
This is the implementation of the HidTEMPerNTC internal sensor.
CONSTANTS
o MAX_TEMPERATURE
The highest temperature(120 degrees celsius) this sensor can detect.
o MIN_TEMPERATURE
The lowest temperature(-40 degrees celsius) this sensor can detect.
METHODS
o celsius()
Returns the current temperature from the device in celsius degrees.
INHERIT METHODS FROM
Device::USB::PCSensor::HidTEMPer::Sensor
DEPENDENCIES
This module internally includes and takes use of the following packages:
use Device::USB::PCSensor::HidTEMPer::Sensor;
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
This code is inspired by Relavak's source code and the comments found at: http://relavak.wordpress.com/2009/10/17/
COPYRIGHT & LICENSE
Copyright (c) 2010 Magnus Sulland
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-07-24 Device::USB::PCSensor::HidTEMPer::NTC::Internal(3pm)
Check Out this Related Man Page
Device::USB::PCSensor::HidTEMPer(3pm) User Contributed Perl Documentation Device::USB::PCSensor::HidTEMPer(3pm)NAME
Device::USB::PCSensor::HidTEMPer - Device overview
VERSION
Version 0.02
SYNOPSIS
Shared code:
use Device::USB::PCSensor::HidTEMPer;
my $pcsensor = Device::USB::PCSensor::HidTEMPer->new();
Single-device systems:
my $device = $pcsensor->device();
print $device->external()->fahrenheit() if defined $device->external();
Multi-device systems:
my @devices = $pcsensor->list_devices();
foreach my $device ( @devices ){
print $device->internal()->celsius() if defined $device->internal();
}
DESCRIPTION
This module is a simplified interface to the HidTEMPer thermometers created by PCSensor. It hides any problems recognizing the correct
objects to initialize and the dependency on Device::USB. Use of the connected thermometers can be done by either creating a array of
objects if multiple devices are connected, or the function device() if only one device is present.
One example of its usage can be found in the Linux Journal August 2010, "Cool Projects edition" page 32-34.
CONSTANTS
The following constants are declared
o PRODUCT_ID
Contains the hex value of the product id on the usb chip, in this case 0x660c
o VENDOR_ID
Contains the hex value representing the manufacturer of the chip, in this case "Tenx Technology, Inc."
o SUPPORTED_DEVICES
Contains the mapping between name and identifiers for all supported thermometers.
Hex value Product Internal sensor External sensor
0x5b HidTEMPerNTC Yes Yes
0x58 HidTEMPer Yes No
METHODS
o new()
Initialize the system, and the USB-connection to be used.
o device()
Return a single thermometer instance. ONLY to be used in systems using a single thermometer device. Returns undef if no devices was
found.
o list_devices()
Returns an array of recognized thermometer instances if an array value is expected, otherwise it returns a scalar with the number of
devices found.
DEPENDENCIES
This module internally includes and takes use of the following packages:
use Device::USB;
use Device::USB::PCSensor::HidTEMPer::Device;
use Device::USB::PCSensor::HidTEMPer::NTC;
use Device::USB::PCSensor::HidTEMPer::TEMPer;
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
None
COPYRIGHT & LICENSE
Copyright (c) 2010 Magnus Sulland
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-07-24 Device::USB::PCSensor::HidTEMPer(3pm)