-
Notifications
You must be signed in to change notification settings - Fork 0
/
c2.html
116 lines (90 loc) · 3.25 KB
/
c2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!doctype html>
<html id="theme" data-theme="dark" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/pico.min.css">
<title>Espress</title>
<style>
.red {
background-color:rgb(167, 52, 52);
border-color:rgb(167, 52, 52);
}
.red:hover {
opacity: 0.9;
}
</style>
</head>
<body style="opacity:0;">
<div w3-include-html="navbar.html"></div>
<div class="container">
<center>
<div id="diagram" class="container">
</div>
<textarea id="mover" rows="7">Click here to move object</textarea>
</center>
<br>
<button id="app_selector" class="i18n" data-target="modal-apps" onClick="toggleModal(event)">Choose an
application</button>
<button class="red i18n" onclick="document.location.href='index.html'">Choose another component</button>
<div id="html_app"></div>
</div>
<article id="not-supported">
<span class="i18n">⚠️ Your browser can't connect to USB Serial, so you can't upload applications and interact
with your microcontroller. ⚠️</span>
<ul>
<li class="i18n">If you are on an 📱smartphone, please use a 💻 computer</li>
<li class="i18n">If you are on a 💻 computer, please use Chrome / Edge or Opera (❌ Firefox / Safari is not
supported yet)</li>
</ul>
<a href="https://caniuse.com/web-serial" class="i18n">Check compatibility list</a>
</article>
</body>
<!-- Modal -->
<dialog id="modal-apps">
<div id="container">
<h3 class="i18n">Choose an application</h3>
<div id="apps">
</div>
<button data-target="modal-apps" onClick="toggleModal(event)" class="i18n">Cancel</button>
</dialog>
<!-- Interaction Library -->
<script type="text/javascript" src="js/esperial/esprerial.min.js"></script>
<script type="text/javascript" src="js/gauge/gauge.min.js"></script>
<script type="text/javascript" src="js/chartjs/chart.min.js"></script>
<!-- Installer Library -->
<script type="module" src="js/esp-web-tools/install-button.js?module"></script>
<!-- Website library -->
<script type="text/javascript" src="js/default.js"></script>
<script type="text/javascript" src="js/components.js"></script>
<script type="text/javascript" src="js/modal.js"></script>
<script type="text/javascript" src="js/svg.js"></script>
<script>
svg_info = [];
svg_info.push(
{
"path": "boards/d1_mini.svg",
"name": "d1_mini",
"transform": "rotate(180) translate(-19.8,23)",
}
);
svg_info.push(
{
"path": "apps/led/led.svg",
"name": "led",
"transform": "rotate(-90) translate(74,-34)",
}
);
svg_info.push(
{
"path": "apps/led/boards/d1_mini/d1_mini_led_connection.svg",
"name": "d1_mini_led_connection",
"transform": "rotate(0) translate(37,14)",
}
)
load_breadboard(svg_info)
document.getElementById("mover").addEventListener("keydown", (e) => {
mover(e, "mover");
});
</script>
</html>