Added Purple colour
This commit is contained in:
parent
e9bf692021
commit
0a5e53897b
@ -64,6 +64,10 @@ DTVControl.prototype.intentHandlers = {
|
||||
path = '/pink.php';
|
||||
break;
|
||||
|
||||
case "purple":
|
||||
path = '/purple.php';
|
||||
break;
|
||||
|
||||
case "off":
|
||||
path = '/off.php';
|
||||
break;
|
||||
|
Binary file not shown.
@ -91,7 +91,9 @@ $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
|
||||
$rgb = "Yellow";
|
||||
} elseif ($file == "255, 102, 255") {
|
||||
$rgb = "Pink";
|
||||
}
|
||||
} elseif ($file == "75, 0, 130") {
|
||||
$rgb = "Purple";
|
||||
}
|
||||
|
||||
// Rendering Page.
|
||||
?><!DOCTYPE html>
|
||||
@ -213,7 +215,7 @@ $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH);
|
||||
<td id="frequency"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="mdl-data-table__cell--non-numeric"></td>
|
||||
<td class="mdl-data-table__cell--non-numeric" onclick="location.href='/purple.php'">Purple</td>
|
||||
<td id="cpu_temperature"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
7
purple.php
Normal file
7
purple.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$fp = fopen('/home/pi/hugh/rgb', 'w');
|
||||
fwrite($fp, '75, 0, 130');
|
||||
fclose($fp);
|
||||
|
||||
echo "<meta http-equiv = 'Refresh' content = '2; url =./index.php'/>"; // change redirectpage.php to where you want to redirect.
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user