当前位置:首页 > 技术 > HTML > 正文内容

浏览器操作COM(串口)库

watrt2年前 (2021-12-23)HTML10820
<!DOCTYPE html>    
<html>    
<head>    
<head>    
<style>    
body {    
color: rgb(248, 248, 242);    
background-color: rgb(39, 40, 34);    
}    
.row {    
display: flex;    
}    
.column {    
flex: 50%;    
}    
.head {    
height: 50px;    
}    
.toolbar {    
height: 20px;    
}    
.content {    
height: calc(100vh - 20px - 50px - 40px - 20px);    
overflow-y: scroll;    
border: 1px solid grey;    
}    
.tail {    
height: 20px;    
}    
</style>    
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>    
</head>    
</head>    
<body>    
<div class="head">    
<h1>CircuitPython 在线编辑器    
<button id="connect" onClick='clickConnect()'> 连接 </button>    
<button    
onclick="window.open('https://docs.google.com/forms/d/e/1FAIpQLSdupiJIRViFwPpuQC1hMp8gRvhxACLoAjgepm_-IRZumwK7Cg/viewform?usp=sf_link')"    
style="float: right;">    
反馈    
</button>    
</h1>    
</div>    
<div class="row">    
<div class="column toolbar">    
编辑器    
<button id="inputfile"> 打开 </button>    
<button id="save" onClick='save_and_run(editor)'> 保存并运行 </button>    
<button onclick="save_code()">另存为</button>    
<button onclick="new_tab()">新标签页</button>    
<text id="filename"></text>    
</div>    
<div class="column toolbar">    
串口    
<button onClick="serial.setValue('')"> 清除 </button>    
<button onclick="savelog()">保存 log</button>    
<button onclick="sendCTRLC()">CTRL-C</button>    
<button onclick="sendCTRLD()">CTRL-D</button>    
<button onclick="window.open('https://github.com/urfdvw/CircuitPython-online-IDE#workflow-aka-how-to-use')"    
style="float: right;">    
IDE 帮助    
</button>    
</div>    
</div>    
<div class="row">    
<div class="column content">    
<div id="my-div">    
</div>    
</div>    
<div class="column content">    
<div id='out_frame'>    
<div id="serial_R">    
</div>    
<div id="serial_T">    
</div>    
</div>    
</div>    
</div>    
<div class="tail">    
参考:    
<button onclick="window.open('https://circuitpython.readthedocs.io/en/latest/docs/index.html')">    
CircuitPython API    
</button>    
<button onclick="window.open('https://circuitpython.readthedocs.io/projects/bundle/en/latest/')">    
库和驱动    
</button>    
<button onclick="window.open('https://circuitpython.readthedocs.io/en/latest/docs/library/index.html')">    
MicroPython 库    
</button>    
<button onclick="window.open('https://circuitpython.org/')">    
CircuitPython 网站    
</button>    
<button id="send_setting" onclick="change_send_key();" style="float: right;">    
[Enter] 发送    
</button>    
</div>    
<script type="text/javascript" src="code.js">    
</script>    
</body>    
</html>

code.zip


分享给朋友:

相关文章

高德点击获取经纬度代码

高德点击获取经纬度代码

<!doctype html> <html> <head>     <meta charset="utf-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">  &n...

http状态码

http状态码

HTTP状态码(响应码)用来表明HTTP请求是否已经成功完成.HTTP响应类型一共分五大类:消息响应,成功响应,重定向,客户端错误,服务器端错误.下表列出了所有HTTP状态码,以及他们各自所代表的含义:状态码原因短语代表含义HTTP 版本消息响应100Continue(继续)客户端应当继续发送请求.这个临时响应是用来通知客户端它的部分请求已经被服务器接收,且仍未被拒绝.客户端应当继续发送请求的剩余部分,或者如果请求已经完成,忽略这个响应.服务器必须在请求完成后向客户端发送一个最终响应.HTTP/...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。