Device::WebIO::RaspberyPi - Access RaspberryPi pins via Device::WebIO
use Device::WebIO; use Device::WebIO::RaspberryPi; my $webio = Device::WebIO->new; my $rpi = Device::WebIO::RaspberryPi->new({ }); $webio->register( 'foo', $rpi ); my $value = $webio->digital_input( 'foo', 0 );
Access the Raspberry Pi's pins using Device::WebIO.
If you intended to use the camera-related methods (e.g. img_stream()), you will need to install the rpicamsrc plugin for GStreamer. You can download and compile this from:
img_stream()
rpicamsrc
https://github.com/thaytan/gst-rpicamsrc
As of version 0.009, Device::WebIO::RaspberryPi has jumped into the Talkies era of movies by allowing audio input on video streams. You'll need a USB sound device that's compatible with the Raspberry Pi which can also take a microphone input. The attribute vid_audio_input_device can be used to set the ALSA device for recording.
Device::WebIO::RaspberryPi
vid_audio_input_device
DigitalOutput
DigitalInput
DigitalInputAnyEvent
PWM
StillImageOutput
I2CProvider
VideoOutputCallback
SPI
Returns the condvar from AnyEvent, which is used for video processing. If there's any events you would like to handle in between video frames, get this condvar and use it with AnyEvent. You may also use this method as a setter before calling vid_stream_begin_loop().
AnyEvent
vid_stream_begin_loop()
When getting the video stream, set this flag to true to get put audio on it. Note that this only applies to outputs that are container formats, like AVI, not raw video outputs, like h.264.
Default if false.
If putting an audio stream on the video, this specifies the ALSA device to use for input. Default is 'hw:1,0'.
Copyright (c) 2018 Timm Murray All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
To install Device::WebIO::RaspberryPi, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::WebIO::RaspberryPi
CPAN shell
perl -MCPAN -e shell install Device::WebIO::RaspberryPi
For more information on module installation, please visit the detailed CPAN module installation guide.