[Chicago-talk] Hello World example for PERL Module
Richard Reina
richard at rushlogistics.com
Tue Oct 5 07:42:47 PDT 2021
Can someone help me out with a Hello World example for this module? https://metacpan.org/dist/Device-Blinkytape/view/lib/Device/BlinkyTape/SimulationPort.pm
I have used BlinkyTape.pm (like in the code below) but now I would like to do some testing on a machine that does not have a BlinkyTape plugged into it's USB port and am not sure how to get started with BlinkyTape/SimulationPort.pm
Thanks for any help.
use strict;
use lib '/home/pi/';
use BlinkyTape;
use Time::HiRes qw / usleep /;
my $bb = Device::BlinkyTape::WS2811->new();
for (my $b=0; $b<=100000; $b++) {
for (my $a=0; $a<=59; $a++) {
$bb->send_pixel(int(rand(254)),int(rand(254)),int(rand(254)));
}
$bb->show(); # shows the sent pixel row.
usleep(400000);
}
More information about the Chicago-talk
mailing list