[Subject]
a. The plants are watered with the mini water pump.
b. A relay is required because the mini water pump operates DC 8V ~ 12V.

[Board]
a. PHPoC Blue(P4S-342)

[Sensor/Module]
a. Mini water pump
b. Relay

[Connection]
Click image for larger version

Name:	Pump_Sketch_Resize.png
Views:	120
Size:	175.8 KB
ID:	58

[Source Code]
index.php
[code=php]
<html>
<head>
<title>PHPoC / <?echo system("uname -i")?></title>
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<style> body { text-align: center; }</style>
</head>
<body>

<h2>

Mini pump<br>

<br>

<?php

include_once "/lib/sd_340.php";

define("OUT_PIN", 0);

uio_setup(0, OUT_PIN, "out");

if(($led0 = _GET("led0")))
{
if($led0 == "low")
uio_out(0, OUT_PIN, LOW);
else
uio_out(0, OUT_PIN, HIGH);
}

if(uio_in(0, OUT_PIN) == LOW)
{
echo "<a href='index.php?led0=high'><img src='button_push.png'></a><br>\r\n";
echo "State : OFF\r\n";
}
else
{
echo "<a href='index.php?led0=low'><img src='button_pop.png'></a><br>\r\n";
echo "State : ON\r\n";
}

?>

</h2>

</body>
</html>
[/code]

[Video]