mirror of
https://github.com/sergeyyarkov/avr128da48_web-serial-example.git
synced 2026-10-11 10:19:02 +03:00
43 lines
1.2 KiB
HTML
43 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 class="app">
|
|
<div>
|
|
<button id="connect">Connect</button>
|
|
<button id="disconnect">Disconnect</button>
|
|
</div>
|
|
<form id="terminal_form" action="#">
|
|
<label for="terminal">Enter command name:</label><br />
|
|
<div class="flex">
|
|
<input
|
|
id="input"
|
|
name="input"
|
|
placeholder="e.g led_toggle"
|
|
type="text"
|
|
disabled
|
|
/>
|
|
<button type="submit">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="vendorId">-</span> |</span>
|
|
<span>deviceId: <span id="productId">-</span></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|