mirror of
https://github.com/sergeyyarkov/avr128da48_web-serial-example.git
synced 2026-10-11 10:19:02 +03:00
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Web Serial API Example</title>
|
|
<link href="./style.css" rel="stylesheet" />
|
|
<script defer src="./app.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div>
|
|
<button id="connect">Connect</button>
|
|
<button id="disconnect">Disconnect</button>
|
|
</div>
|
|
<form id="terminal_form" action="#">
|
|
<label for="input">Enter command name:</label><br />
|
|
<div>
|
|
<input id="input" name="input" placeholder="e.g led_toggle" type="text" disabled />
|
|
<button name="send" type="submit" disabled>Send</button>
|
|
</div>
|
|
</form>
|
|
<textarea id="serial_log" placeholder=">" readonly></textarea>
|
|
<div id="port_info">
|
|
<div>
|
|
<p id="status">not connected</p>
|
|
</div>
|
|
<div>
|
|
<span>vendorId: <span id="vendor_id">-</span> |</span>
|
|
<span>deviceId: <span id="product_id">-</span></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|