Acme-FishFarm
view release on metacpan or search on metacpan
docs/Acme-FishFarm-WaterConditionMonitor-1.01.html view on Meta::CPAN
<li><a href="#ph_is_normal">ph_is_normal</a></li>
<li><a href="#current_temperature-new_temperature">current_temperature ( $new_temperature )</a></li>
<li><a href="#temperature_threshold">temperature_threshold</a></li>
<li><a href="#set_temperature_threshold-new_temperature">set_temperature_threshold ( $new_temperature )</a></li>
<li><a href="#temperature_is_normal">temperature_is_normal</a></li>
<li><a href="#lacking_oxygen">lacking_oxygen</a></li>
<li><a href="#current_turbidity-new_turbidity">current_turbidity ( $new_turbidity )</a></li>
<li><a href="#turbidity_threshold">turbidity_threshold</a></li>
<li><a href="#set_turbidity_threshold-new_turbidity_threshold">set_turbidity_threshold ( $new_turbidity_threshold )</a></li>
<li><a href="#water_dirty">water_dirty</a></li>
</ul>
</li>
<li><a href="#BUZZER-RELATED-SUBROUTINES-METHODS">BUZZER RELATED SUBROUTINES/METHODS</a>
<ul>
<li><a href="#is_on_buzzer_short">is_on_buzzer_short</a></li>
<li><a href="#is_on_buzzer_long">is_on_buzzer_long</a></li>
</ul>
</li>
<li><a href="#Private-Methods-for-Buzzers">Private Methods for Buzzers</a></li>
<li><a href="#LED-LIGHTS-RELATED-SUBROUTINES-METHODS">LED LIGHTS RELATED SUBROUTINES/METHODS</a>
<ul>
<li><a href="#on_LED_pH">on_LED_pH</a></li>
<li><a href="#is_on_LED_pH">is_on_LED_pH</a></li>
<li><a href="#on_LED_temperature">on_LED_temperature</a></li>
<li><a href="#is_on_LED_temperature">is_on_LED_temperature</a></li>
<li><a href="#on_LED_DO">on_LED_DO</a></li>
<li><a href="#is_on_LED_DO">is_on_LED_DO</a></li>
<li><a href="#on_LED_turbidity">on_LED_turbidity</a></li>
<li><a href="#is_on_LED_turbidity">is_on_LED_turbidity</a></li>
<li><a href="#lighted_LED_count">lighted_LED_count</a></li>
</ul>
</li>
<li><a href="#AUTHOR">AUTHOR</a></li>
<li><a href="#BUGS">BUGS</a></li>
<li><a href="#SUPPORT">SUPPORT</a></li>
<li><a href="#ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</a></li>
<li><a href="#LICENSE-AND-COPYRIGHT">LICENSE AND COPYRIGHT</a></li>
</ul>
<h1 id="NAME">NAME</h1>
<p>Acme::FishFarm::WaterConditionMonitor - Water Condition Monitor for Acme::FishFarm</p>
<h1 id="VERSION">VERSION</h1>
<p>Version 1.01</p>
<h1 id="SYNOPSIS">SYNOPSIS</h1>
<pre><code> use 5.010;
use Acme::FishFarm::WaterConditionMonitor;
use Acme::FishFarm::OxygenMaintainer;
my $water_monitor = Acme::FishFarm::WaterConditionMonitor->install;
my $oxygen = Acme::FishFarm::OxygenMaintainer->install( DO_generation_volume => 1.92 );
$water_monitor->add_oxygen_maintainer( $oxygen );
# always check water conditions before checking LEDs and buzzers
# also, these four method will return 1 or 0, upon calling them, the status of LEDs and buzzers will also be updated
$water_monitor->ph_is_normal;
$water_monitor->temperature_is_normal;
$water_monitor->lacking_oxygen;
$water_monitor->water_dirty;
if ( $water_monitor->is_on_LED_DO ) {
# do something, same goes to the rest of the LEDs
}
if ( $water_monitor->is_on_buzzer_short ) {
# do something
} elsif ( $water_monitor->is_on_buzzer_long ) {
# do something
}</code></pre>
<h1 id="EXPORT">EXPORT</h1>
<p>None</p>
<h1 id="NOTES">NOTES</h1>
<p>Some of the methods in this module can be confusing expecially when it comes to checking abnormal water conditions.</p>
<p><b>Please always always always check the water condition before checking the LEDs and buzzers status.</b></p>
<p><code>Acme::FishFarm</code> contains subroutines to check all the abnormal water conditions to ease this job.</p>
<h1 id="CREATION-RELATED-SUBROUTINES-METHODS">CREATION RELATED SUBROUTINES/METHODS</h1>
<p>Only 3 sensors are built-in. However, there is a 4th socket for the oxygen maintainer. For this socket, you'll need to manuall connect an Acme::FishFarm::OxygenMaintainer object by calling the <code>add_oxygen_maintainer</code> method.</p>
<p>More sockets might be available in the future.</p>
<h2 id="install-sensors">install ( %sensors )</h2>
<p>Installs a water condition monitoring system.</p>
<p>The <code>%sensors</code> included are:</p>
<dl>
<dt id="pH">pH</dt>
<dd>
<p>Optional. The default threshold range is <code>[6.5, 7.5]</code> and the default pH is <code>7.0</code>.</p>
<p>This will set the threshold value of the water pH. Please pass in an array reference to this key in the form of <code>[min_pH, max_pH]</code></p>
<p>The values are in the range of <code>1-14</code>. However, this range is not checked for incorrect values.</p>
</dd>
<dt id="temperature">temperature</dt>
<dd>
<p>Optional. The default threshold range is <code>[20, 25]</code> degree celcius and the default temprature is <code>25</code>.</p>
<p>This will set the threshold value of the water temperature. Please pass in an array reference to this key in the form of <code>[min_temperature, max_temperature]</code></p>
<p>The ranges of values are between <code>0</code> and <code>50</code> degree <b>celcius</b>. However, this range is not checked for incorrect values. The unit <code>celcius</code> is just a unit, it doesn't show up if you call any of it's re...
( run in 0.782 second using v1.01-cache-2.11-cpan-5837b0d9d2c )