Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conexao = fopen("COM3","w");/* NÃO ATRIBUIR UMA PORTA ACIMA DA COM5 */
- /*<?php
- echo"Comando:";
- echo $_REQUEST["numero"];
- ?>*/
- fwrite($conexao,$_REQUEST["numero"]);
- fclose($conexao);
- ?>
- <html>
- <head>
- <title>PHP e Arduino</title>
- <style>
- .divImg{
- height: 200px;
- text-align: center;
- }
- .divStyle{
- height: 30px;
- text-align: center;
- font-weight: bold;
- }
- </style>
- <head>
- <body>
- <form action="CONTROLE_LED_SERIAL_ARDUINO.php" method="post">
- <div class="divImg">
- <?php
- if ($_REQUEST["numero"] == 1){
- echo '<img src="imagens/lamp_on.png">';
- }
- else {
- echo '<img src="imagens/lamp_off.png">';
- }
- ?>
- </div>
- <div class="divStyle">
- <input type="submit" name="numero" value="1">
- <input type="submit" name="numero" value="0">
- </div>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement