Acme-FishFarm

 view release on metacpan or  search on metacpan

lib/Acme/FishFarm.pm  view on Meta::CPAN

        
    print "Total LEDs up: ", $water_monitor->lighted_LED_count, "\n";

    if ( $water_monitor->is_on_LED_pH ) {
        print "  pH LED: on\n";
    } else {
        print "  pH LED: off\n";
    }
    
    if ( $water_monitor->is_on_LED_temperature ) {
        print "  Temperature LED: on\n";
    } else {
        print "  Temperature LED: off\n";
    }
    
    if ( $water_monitor->is_on_LED_DO ) {
        print "  Low DO LED: on\n";
    } else {
        print "  Low DO LED: off\n";
    }
    
    if ( $water_monitor->is_on_LED_turbidity ) {
        print "  Turbidity LED: on\n";
    } else {
        print "  Turbidity LED: off\n";
    }
    1;
}

=head2 render_buzzer ( $water_monitor )

Outputs which buzzer is buzzing. Returns 1 upon success.

See C<Acme::FishFarm::WaterConditionMonitor> for details on how the short and long buzzers are switched on and off.

=cut

sub render_buzzer {
    my $water_monitor = shift;
    
    #$water_monitor->_tweak_buzzers;
    if ( $water_monitor->is_on_buzzer_long ) {
        print "Long buzzer is on, water condition very critical!\n";
    } elsif ( $water_monitor->is_on_buzzer_short ) {
        print "Short buzzer is on, water condition is a bit worrying :|\n";
    } else {
        print "No buzzers on, what a peaceful moment.\n";
    }
    1;
}


=head1 AUTHOR

Raphael Jong Jun Jie, C<< <ellednera at cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-acme-fishfarm at rt.cpan.org>, or through
the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-FishFarm>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.




=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Acme::FishFarm


You can also look for information at:

=over 4

=item * RT: CPAN's request tracker (report bugs here)

L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-FishFarm>

=item * CPAN Ratings

L<https://cpanratings.perl.org/d/Acme-FishFarm>

=item * Search CPAN

L<https://metacpan.org/release/Acme-FishFarm>

=back


=head1 ACKNOWLEDGEMENTS

Besiyata d'shmaya

=head1 SEE ALSO

    Acme::FishFarm::Feeder

    Acme::FishFarm::OxygenMaintainer

    Acme::FishFarm::WaterConditionMonitor

    Acme::FishFarm::WaterFiltration

    Acme::FishFarm::::WaterLevelMaintainer

=head1 LICENSE AND COPYRIGHT

This software is Copyright (c) 2021 by Raphael Jong Jun Jie.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)


=cut

1; # End of Acme::FishFarm



( run in 0.940 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )