NAME
Acme::FishFarm - A Fish Farm with Automated Systems
VERSION
Version 1.00
SYNOPSIS
use Acme::FishFarm;
# missing stuff will be added in the next release
EXPORT
The tag :all
can be used to import all the functions available in this module.
SYSTEM INSTALLATION RELATED SUBROUTINES
install_all_systems
Installs all the available systems with default values and returns them as a list of Acme::FishFarm::*
objects in the following sequence:
C<(Feeder, OxygenMaintainer, WaterConditionMonitor, WaterLevelMaintainer, WaterFiltration)>
Take note that only the water condition monitor currently supports the oxygen maintainer only.
SENSOR READING RELATED SUBROUTINES
reduce_precision ( $decimal )
Reduces positive or negative $decimal
to a 3-decimal value. Make sure to pass in a decimal with more than 3 decimal points.
Returns the reduced precision value.
This subroutine is useful if you are trying to set the current sensor readings randomly using the built-in rand
function as you do not want to end up with too many decimals on the screen.
AUTOMATED SYSTEMS RELATED SUBROUTINES
All of the subroutines here will give output.
Take note that there are some systems that can't be connected to the water monitoring system and therefore will not effect the LEDs or buzzers. These systems are:
Acme::FishFarm::WaterFiltration
Acme::FishFarm::WaterLevelMaintainer
consume_oxygen ( $oxygen_maintainer, $consumed_oxygen )
This will cause the oxygen level (DO level) of the Acme::FishFarm::OxygenMaintainer
to reduce by $consumed_oxygen mg/L
Returns 1 upon success.
check_DO ( $oxygen_maintainer, $current_DO_reading )
This checks and outputs the condition of the current DO level.
Take note that this process will also trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
check_pH ( $water_monitor, $current_ph_reading )
This checks and outputs the condition of the current pH value.
Take note that this process will also trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
check_temperature ( $water_monitor, $current_temperature_reading )
This checks and outputs the condition of the current temperature.
Take note that this process will also trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
check_turbidity ( $water_monitor, $current_turbidity_reading )
This checks and outputs the condition of the current temperature.
Take note that this process will also trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
check_water_filter ( $water_filter, $current_waste_count, $reduce_waste_by )
This checks, performs necessary actions and outputs the condition of the current waste count in the filtering cylinder.
Take note that this process DOES NOT trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
check_water_level ( $water_level_maintainer, $current_water_level )
This checks, performs necessary actions and outputs the condition of the current waste count in the filtering cylinder.
Take note that this process DOES NOT trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
check_feeder ( $feeder, $verbose )
This checks, performs necessary actions and outputs the condition of the feeder. Each call will tick the clock inside the feeder. See Acme::FishFarm::Feeder
for more info.
If the food tank is empty, it will be filled to the default. So if you want to fill a different amount, please set the amount before hand. See <Acme::FishFarm::Feeder>.
Setting $verbose
to 1 will give more output about the empty food tank.
Take note that this process DOES NOT trigger the LED and buzzer if abnormal condition is present.
Returns 1 upon success.
render_leds ( $water_monitor )
Outputs which LEDs are lighted up. Returns 1 upon success.
Currently this subroutine only shows the LEDs present in $water_monitor
ie. Acme::FishFarm::WaterConditionMonitor
object. See that module for more details about the available LEDs.
More LEDs will be available in the future. You can append your own LEDs by yourself if you really need to :)
render_buzzer ( $water_monitor )
Outputs which buzzer is buzzing. Returns 1 upon success.
See Acme::FishFarm::WaterConditionMonitor
for details on how the short and long buzzers are switched on and off.
AUTHOR
Raphael Jong Jun Jie, <ellednera at cpan.org>
BUGS
Please report any bugs or feature requests to bug-acme-fishfarm at rt.cpan.org
, or through the web interface at 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.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Acme::FishFarm
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Besiyata d'shmaya
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)