The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Device::Velleman::K8055::Client - Client for connecting to K8055::Server

SYNOPSIS

use Device::Velleman::K8055::Client;
my $k8055 = Device::Velleman::K8055::Client->new();
.
$k8055->SetDigitalChannel(8);
$volts = $k8055->ReadAnalogChannel(1) * 0.086;
print "$volts\n";
.
.
$k8055->destroy();

DESCRIPTION

Connects to Device::Velleman::K8055::Server via IPCS and sends commands for the Server to execute on the K8055 board.

Handles multiple clients connecting at the same time and ensures only one command gets sent to the physical board at a time.

METHODS

new()

Create a new instance of the Client. Sets up a shared memory connection to the server.

ReadAnalogChannel($channel)

Read the analog channel specified by channel.

Returns the value read from the channel.

ClearDigitalChannel($channel)

Set the digital channel $channel to 0 or low.

SetDigitalChannel($channel)

Set the digital channel($channel to 1 or high.

destroy

Kill the client connection and tell the server to free any shared memory we have.

BUGS

Does NOT ensure that two different processes arent using the same digital or 
analog i/o's at the same time.

Not all functions of the K8055 (reading the digital inputs or talking to the pwm)
are implemented yet.

You need to be careful at which speed you talk to the board as it has 10us resolution.
Any quicker than this and you will get wierd results.

AUTHOR

David Peters
CPAN ID: DAVIDP
davidp@electronf.com
http://www.electronf.com

COPYRIGHT

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

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

Device::Velleman::K8055::Server, Device::Velleman::K8055::libk8055, perl(1).