<commit_before><commit_msg>arduino php thing for the stuff<commit_after><?php
// Thanks to this guy, 
//http://www.instructables.com/id/Control-an-Arduino-with-PHP/step3/Touching-the-serial-port-in-PHP/
//who should how to read/write to serial ports.

$verz="1.0";
$comPort = "/dev/ttyUSB0"; /*change to correct com port */
$score = 0;
if (isset($_POST["rcmd"])) {
$rcmd = $_POST["rcmd"];
switch ($rcmd) {
     case Stop:
        $fp =fopen($comPort, "w");
  fwrite($fp, 1); /* this is the number that it will write */
  fclose($fp);
  break;
     case Slow:
        $fp =fopen($comPort, "w");
  fwrite($fp, 2); /* this is the number that it will write */
  fclose($fp);
  break;
  case Medium:
        $fp =fopen($comPort, "w");
  fwrite($fp, 3); /* this is the number that it will write */
  fclose($fp);
  break;
  case Fast:
        $fp =fopen($comPort, "w");
  fwrite($fp, 4); /* this is the number that it will write */
  fclose($fp);
  break;
case Right:
        $fp =fopen($comPort, "w");
  fwrite($fp, 5); /* this is the number that it will write */
  fclose($fp);
  break;
case Left:
        $fp =fopen($comPort, "w");
  fwrite($fp, 6); /* this is the number that it will write */
  fclose($fp);
  break;
default:
  die('Crap, something went wrong. The page just puked.');
}

}
?>
<html>
<body>

<center><h1>Hot Fuss</h1></center>
<div id="container" style="width:100%">
	<div id="left" style="background-color:yellow; width:50%; height:100%; float:left">
		<center>
			<h2 style="color:black">Yellow</h2>
				<h2 style="color:black">
					<?php
							$fp = fopen($comPort, "r");
							$score = fread($comPort);
							echo $score;
					?>
				</h2>
		</center>
	</div>
	<div id="right" style="background-color:black; width:50%; height:100%; float:right">
			<center><h2 style="color:yellow">Black</h2></center>
			<?php
					$fp = fopen($comPort, "r");
					$score = fread($comPort);
					echo $score;
			?>	
	</div>
</div>


</body>
</html>
{'fraction_non_alphanumeric': 0.19907881269191402, 'fraction_numerical': 0.016376663254861822, 'mean_word_length': 3.222462203023758, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3246682', 'n_tokens_mistral': 805, 'n_tokens_neox': 732, 'n_words': 195}