Device::Velleman::K8055::Client - Client for connecting to K8055::Server
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();
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.
Create a new instance of the Client. Sets up a shared memory connection to the server.
Read the analog channel specified by channel.
Returns the value read from the channel.
Set the digital channel $channel to 0 or low.
Set the digital channel($channel to 1 or high.
Kill the client connection and tell the server to free any shared memory we have.
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.
David Peters CPAN ID: DAVIDP davidp@electronf.com http://www.electronf.com
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.
Device::Velleman::K8055::Server, Device::Velleman::K8055::libk8055, perl(1).
To install Device::Velleman::K8055::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Velleman::K8055::Client
CPAN shell
perl -MCPAN -e shell install Device::Velleman::K8055::Client
For more information on module installation, please visit the detailed CPAN module installation guide.