Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <form method="post" action="002.php">
- <input type="submit" value="cd dp1" name="submit1">
- </form>
- <?php
- ini_set( 'display_errors', 'On' );
- error_reporting( E_ALL );
- include("serial.conf.php");
- function display()
- {
- global $serial;
- $str = $_POST['submit1'];
- //$str = "\r";
- print $str;
- $serial->deviceOpen();
- //$serial->sendMessage($str);
- //$serial->sendMessage("\r");
- usleep(200000);
- $read = $serial->readPort();
- print $read;
- $serial->deviceClose();
- }
- if(isset($_POST['submit1']))
- {
- display();
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement