From 25b3222db9d9ff8130a688f2d8a3fda2c87babb2 Mon Sep 17 00:00:00 2001 From: Karl Hudgell Date: Thu, 1 Dec 2016 14:57:16 +0000 Subject: [PATCH] final fix --- index.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 9bda0a5..6687570 100644 --- a/index.php +++ b/index.php @@ -79,7 +79,15 @@ for ($count = 1; $count < sizeof($diskfree); $count ++) { //Read in RGB file $file = file_get_contents('/home/pi/hugh/rgb', FILE_USE_INCLUDE_PATH); - +if ($file > "0, 0, 0") { + $rgb = "Off"; +} elseif ($file > "255, 0, 0") { + $rgb = "Red"; +} elseif ($file > "0, 255, 0") { + $rgb = "Green"; +} elseif ($file > "0, 0, 255") { + $rgb = "Blue"; +} // Rendering Page. ?>