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 email@example.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.