const char *html = "<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>传智教育元气派</title><style> body {user-select: none;text-align: center;} table {margin: 0 auto} td div {width: 150px;height: 150px;border: 1px solid darkgrey;display: flex;align-items: center;justify-content: center;color: black;} #s {background-color: red;color: white;} td div:active {background: deepskyblue;color: white;} button {margin: 0.5rem;width: 9rem;height: 3rem;font-size: 1.2rem;border-radius: 1rem;} button:hover {border-radius: 1rem;background-color: deepskyblue;color: aliceblue;}</style></head><body><h1>鸿蒙狗控制</h1><button id="a">安装模式</button><br><br><button id="b">原地踏步</button><br><br data-tomark-pass><button id="c">蹲下</button><br data-tomark-pass><br data-tomark-pass><button id="d">前进</button><br data-tomark-pass><br data-tomark-pass><button id="e">后退</button><br data-tomark-pass><br data-tomark-pass><button id="f">左转</button><br data-tomark-pass><br data-tomark-pass><button id="g">右转</button><br data-tomark-pass><br data-tomark-pass><script> function u(p) {return `${p}`;}function g(i) {return document.getElementById(i);}function fe(e, f) {e.addEventListener('click', function (e) {/* do something*/f();});}function fg(u, f) {let x = new XMLHttpRequest();x.onreadystatechange = function () {if (this.readyState == 4 && this.status == 200) {f(x);}};x.open("GET", u, true);x.send();}function fp(u, d, f, p) {let x = new XMLHttpRequest();if (p) {x.upload.addEventListener('progress', function (e) {p(e);});}x.onreadystatechange = function () {if (this.readyState == 4 && this.status == 200) {f(x);}};x.open('POST', u, true);x.timeout = 45000;x.send(d);}fe(g('a'), () => {fg(u('/dog/init'), () => {});});fe(g('b'), () => {let data = {"type": 3, "count": 30, "list": [[74, 111, 24, 151, 24, 151, 74, 111, 100], [24, 151, 74, 111, 74, 111, 24, 151, 100]]};fp(u('/dog/cmds'), JSON.stringify(data), () => {});});fe(g('c'), () => {let data = {"type": 3, "count": 30, "list": [[74, 111, 24, 151, 24, 151, 74, 111, 100], [24, 151, 74, 111, 74, 111, 24, 151, 100]]};fp(u('/dog/cmds'), JSON.stringify(data), () => {});});fe(g('d'), () => {let data = {"type": 3, "count": 30, "list": [[74, 111, 24, 151, 24, 151, 74, 111, 100], [24, 151, 74, 111, 74, 111, 24, 151, 100]]};fp(u('/dog/cmds'), JSON.stringify(data), () => {});});fe(g('e'), () => {let data = {"type": 3, "count": 30, "list": [[74, 111, 24, 151, 24, 151, 74, 111, 100], [24, 151, 74, 111, 74, 111, 24, 151, 100]]};fp(u('/dog/cmds'), JSON.stringify(data), () => {});});fe(g('f'), () => {let data = {"type": 3, "count": 30, "list": [[74, 111, 24, 151, 24, 151, 74, 111, 100], [24, 151, 74, 111, 74, 111, 24, 151, 100]]};fp(u('/dog/cmds'), JSON.stringify(data), () => {});});fe(g('g'), () => {let data = {"type": 3, "count": 30, "list": [[74, 111, 24, 151, 24, 151, 74, 111, 100], [24, 151, 74, 111, 74, 111, 24, 151, 100]]};fp(u('/dog/cmds'), JSON.stringify(data), () => {});});</script></body></html>";
!注意:请使用浏览器自带下载,迅雷等下载软件可能无法下载到有效资源。
器件 | 类型 | 描述 | 数据手册 |
---|---|---|---|
B-2100S02P-A110 | 排针 | 点击下载 | |
SC0603J2004F2BNRH | 贴片电阻 | 点击下载 | |
SC0603J20R0F2BNRH | 贴片电阻 | 点击下载 | |
LM1084S-5.0/TR | 低压差线性稳压(LDO) | 输出类型:固定 最大输入电压:12V 输出电流:5A 输出电压(最小值/固定值):5V | 点击下载 |
AMS1117-3.3 | 低压差线性稳压(LDO) | 输出类型:固定 最大输入电压:18V 输出电流:1A 输出电压(最小值/固定值):3.3V | 点击下载 |
SC0603J1202F2BNRH | 贴片电阻 | 点击下载 | |
ITCAST-HI3861 | WiFi模块 | 点击下载 | |
PCA9685PW/Q900,118 | LED驱动 | 点击下载 | |
TSC015A03518A | 轻触开关 | 点击下载 | |
01.5.5.1.304.03 | 排针 | 点击下载 | |
PH-00336 | 排针 | 点击下载 |
欢迎加入EEWorld参考设计群,也许能碰到搞同一个设计的小伙伴,群聊设计经验和难点。 入群方式:微信搜索“helloeeworld”或者扫描二维码,备注:参考设计,即可被拉入群。 另外,如您在下载此设计遇到问题,也可以微信添加“helloeeworld”及时沟通。
EEWorld Datasheet 技术支持