-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
index.html
398 lines (396 loc) · 19.8 KB
/
index.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE HTML>
<html>
<head>
<link rel="icon" type="image/ico" href="media/app.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Otto Blockly </title>
<!-- JavaScript -->
<script type="text/javascript" src="js/blockly.min.js"></script>
<script type="text/javascript" src="js/type.js"></script>
<script type="text/javascript" src="js/types.js"></script>
<script type="text/javascript" src="js/typings.js"></script>
<script type="text/javascript" src="js/generate_python.js"></script>
<script type="text/javascript" src="js/generate_cpp.js"></script>
<script type="text/javascript" src="js/blocklino.js"></script>
<script type="text/javascript" src="js/boards.js"></script>
<script src="js/jquery.min.2.1.3.js" onload="window.$ = window.jQuery = module.exports;"></script>
<script type="text/javascript" src="js/bootstrap.toggle.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.3.3.6.js"></script>
<script type="text/javascript" src="js/prettify.min.js"></script>
<script type="text/javascript" src="blocs&generateurs/blockly_blocs.js"></script>
<script type="text/javascript" src="blocs&generateurs/arduino_blocs.js"></script>
<script type="text/javascript" src="blocs&generateurs/arduino_generateurs_cpp.js"></script>
<script type="text/javascript" src="blocs&generateurs/arduino_generateurs_python.js"></script>
<script type="text/javascript" src="blocs&generateurs/blockly_generateurs_cpp.js"></script>
<script type="text/javascript" src="blocs&generateurs/blockly_generateurs_python.js"></script>
<script type="text/javascript" src="blocs&generateurs/audio.js"></script>
<script type="text/javascript" src="blocs&generateurs/analogkey.js"></script>
<script type="text/javascript" src="blocs&generateurs/leds.js"></script>
<script type="text/javascript" src="blocs&generateurs/RTTTL.js"></script>
<script type="text/javascript" src="blocs&generateurs/sensors.js"></script>
<script type="text/javascript" src="blocs&generateurs/softBT.js"></script>
<script type="text/javascript" src="blocs&generateurs/SerialUSB.js"></script>
<script type="text/javascript" src="blocs&generateurs/SoftwareSerial.js"></script>
<script type="text/javascript" src="blocs&generateurs/OpenSmartMP3.js"></script>
<script type="text/javascript" src="blocs&generateurs/MP3YX5300.js"></script>
<script type="text/javascript" src="blocs&generateurs/ST7735.js"></script>
<script type="text/javascript" src="blocs&generateurs/matrix.js"></script>
<script type="text/javascript" src="blocs&generateurs/MAX7219.js"></script>
<script type="text/javascript" src="blocs&generateurs/TCS34725.js"></script>
<script type="text/javascript" src="blocs&generateurs/HMC5883.js"></script>
<script type="text/javascript" src="blocs&generateurs/RFID.js"></script>
<script type="text/javascript" src="blocs&generateurs/gyro.js"></script>
<script type="text/javascript" src="blocs&generateurs/GPS.js"></script>
<script type="text/javascript" src="blocs&generateurs/ESPFunctions.js"></script>
<script type="text/javascript" src="blocs&generateurs/DisplayTM1637.js"></script>
<script type="text/javascript" src="blocs&generateurs/RadioTEA5767.js"></script>
<script type="text/javascript" src="blocs&generateurs/Lcd_I2C.js"></script>
<script type="text/javascript" src="blocs&generateurs/Keyboard_and_mouse.js"></script>
<script type="text/javascript" src="blocs&generateurs/APDS9960.js"></script>
<script type="text/javascript" src="blocs&generateurs/mu_vision_sensor.js"></script>
<script type="text/javascript" src="blocs&generateurs/remoteControl.js"></script>
<script type="text/javascript" src="blocs&generateurs/RTC_DS3231.js"></script>
<script type="text/javascript" src="blocs&generateurs/InternalRTC.js"></script>
<script type="text/javascript" src="blocs&generateurs/html.js"></script>
<script type="text/javascript" src="blocs&generateurs/microbit.js"></script>
<script type="text/javascript" src="blocs&generateurs/otto.js"></script>
<script type="text/javascript" src="blocs&generateurs/ottoesp.js"></script>
<script type="text/javascript" src="blocs&generateurs/oled.js"></script>
<script type="text/javascript" src="blocs&generateurs/encoder.js"></script>
<script type="text/javascript" src="blocs&generateurs/motor.js"></script>
<script type="text/javascript" src="blocs&generateurs/escornabot.js"></script>
<script type="text/javascript" src="blocs&generateurs/neopixel.js"></script>
<script type="text/javascript" src="blocs&generateurs/MQTT.js"></script>
<script type="text/javascript" src="blocs&generateurs/Thingspeak.js"></script>
<script type="text/javascript" src="blocs&generateurs/Firebase.js"></script>
<script type="text/javascript" src="blocs&generateurs/Telegram.js"></script>
<script type="text/javascript" src="blocs&generateurs/OpenWeather.js"></script>
<script type="text/javascript" src="blocs&generateurs/IFTTT.js"></script>
<script type="text/javascript" src="blocs&generateurs/NTP.js"></script>
<script type="text/javascript" src="blocs&generateurs/WifiBasic.js"></script>
<script type="text/javascript" src="blocs&generateurs/WifiServer.js"></script>
<script type="text/javascript" src="blocs&generateurs/EspNow.js"></script>
<script type="text/javascript" src="blocs&generateurs/Alexa.js"></script>
<script type="text/javascript" src="blocs&generateurs/text.js"></script>
<script type="text/javascript" src="js/typing.js"></script>
<script type="text/javascript" src="lang/code.js"></script>
<script type="text/javascript" src="js/hexlify.js"></script>
<script type="text/javascript" src="js/intel-hex.browser.js"></script>
<script type="text/javascript" src="js/ace.js"></script>
<script type="text/javascript" src="js/ext-language_tools.js"></script>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.3.3.6.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap.toggle.min.css"/>
<link rel="stylesheet" type="text/css" href="css/blocklino.css"/>
<link rel="stylesheet" type="text/css" href="css/prettify.min.css"/>
</head>
<body onload="BlocklyDuino.init()">
<div class="loading"></div>
<div id="toptitle">
<div id="title">
<div class="img"><a href=https://www.ottodiy.com/><img src="media/icon.png" class="img-fluid" alt="Logo"></a></div>
<!-- <span id="span_blocklino"></span>-->
</span>
</div>
<div id="title-bar-btns">
<button id="btn_min" type="button" class="btn btn-minmax"><span class="fa fa-minimize fa-lg"></span></button>
<button id="btn_max" type="button" class="btn btn-minmax"><span class="fa fa-maximize fa-lg"></span></button>
<button id="btn_quit" type="button" class="btn btn-quit"><span class="fa fa-times fa-1_75x"></span></button>
</div>
</div>
<div id="header">
<div id="btn_all" >
<ul class="nav nav-tabs" role="tablist" style="display: none;">
<li role="presentation" class="active"><a href="#content_blocks" aria-controls="content_blocks" role="tab" data-toggle="tab"></a></li>
<li role="presentation"><a href="#content_code" aria-controls="content_code" role="tab" data-toggle="tab"></a></li>
</ul>
<span id="labelToolboxDefinition" style="color:white;font-weight: bold" > </span>
<div id="btn_group1" class="btn-group" >
<button id="btn_level1" class="btn btn-arduino-rect" >1
</button>
<button id="btn_level2" class="btn btn-arduino-rect" >2
</button>
<button id="btn_level3" class="btn btn-arduino-rect" >3
</button>
</div>
<select id="languageMenu" onchange="BlocklyDuino.changelanguage();" style="height: 42px; border-radius: 5px; font-weight: bold" ></select>
<!-- <button id="btn_config" class="btn btn-arduino" data-toggle="modal" data-target="#configModal">
<span class="fa fa-cog fa-lg fa-fw"></span>
</button> -->
<button id="btn_example" class="btn btn-arduino-rect" data-toggle="modal" data-target="#exampleModal">
<span class="fa fa-graduation"></span>
</button>
<!-- <span id="exampleModalLabel" style="color:white;font-size:4" > </span> -->
<input id="title-project-name" type="text" placeholder="Project name" value=""/>
<button id="btn_saveXML" class="btn btn-arduino-rect" >
<span class="fa fa-floppy-o fa-lg fa-fw"></span>
</button>
<button id="btn_new" class="btn btn-arduino-rect">
<span class="fa fa-file"></span>
</button>
<button id="btn_fakeload" class="btn btn-arduino-rect">
<span class="fa fa-folder-open"></span>
</button>
<input type="file" id="load" accept=".bloc,.xml,.py,.ino" style="display: none;" />
<!-- <button id="btn_print" class="btn btn-arduino-rect"> <span class="fa fa-camera"> </span></button>-->
<button id="btn_undo" class="btn btn-arduino-rect">
<span class="fa fa-undo"> </span>
</button>
<button id="btn_redo" class="btn btn-arduino-rect">
<span class="fa fa-repeat"> </span>
</button>
<!-- <button id="btn_card" class="btn btn-arduino-rect" data-toggle="modal" data-target="#card" style="margin-top: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px;">
<span class="fa fa-microchip" > </span> </button>-->
<select style="height: 0px; height: 42px; border-radius: 5px;font-weight: bold" id="boards" onchange="BlocklyDuino.change_card();">
<option value="OttoESP" >ESP8266</option>
<option value="nanooptiboot">♾ Nano</option>
<option value="nano" >♾ Nano Old </option>
<option value="Ottoky" >Ottoky ESP32</option>
<option value="MRTnode" >MRTnode ESP32</option>
<option value="mrtduino" >MRTduino</option>
<option value="uno_bt" >ZUM BT-328</option>
<option value="uno" >♾ Uno</option>
<option value="nona4809">♾ Nano Every</option>
<option value="leonardo" >♾ Leonardo</option>
<option value="micro" >♾ Micro</option>
<option value="mega" >♾ Mega</option>
<option value="mkrwifi1010" >♾ MKR WiFi</option>
<!--<option value="mini" >Arduino Mini</option>
<option value="wemosD1miniPro" >WeMos D1 mini</option>
<option value="pro8" >Arduino Pro / Pro Mini 3.3V</option>
<option value="yun" >Arduino Yun</option> -->
</select>
<!-- <button id="btn_usb" class="btn btn-arduino-rect" data-toggle="modal" data-target="#usb" style="margin-top: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px;">
<span class="fa fa-usb"></span> </button> -->
<select style="height: 0px; height: 42px; border-radius: 5px;font-weight: bold" id="portserie" onchange="BlocklyDuino.save_com();"></select>
<button id="btn_verify" class="btn btn-arduino" data-toggle="modal" data-target="#message">
<span class="fa fa-check fa-1_5x"> </span>
</button>
<button id="btn_flash" class='btn btn-arduino' data-toggle="modal" data-target="#message">
<span class="fa fa-arrow-right fa-1_5x"> </span>
</button>
<span id="survol" style="color:#fff"></span>
</div>
<div id="btn_group" class="btn-group" role="group">
<!-- <button id="btn_about" class="btn btn-arduino-rect" data-toggle="modal" data-target="#aboutModal"><span class="fa fa-question"></span> </button> -->
<!-- <button id="btn_bin" class='btn btn-default'> <span class="fa fa-download"> </span> </button> -->
<!-- <button id="btn_factory" class="btn btn-default"><span class="fa fa-industry fa-fw"> </span> </button> -->
<button id="btn_term" class="btn btn-arduino-rect"><span class="fa fa-search"></span></button>
<button id="btn_preview" class="btn btn-arduino-rect"><span class="fa fa-code "> </span> </button>
<button id="btn_search" class='btn btn-arduino-rect'><span class="fa fa-binoculars"> </span></button>
<input id="codeORblock" checked data-size="small" data-toggle="toggle" data-on="<span class='fa fa-puzzle fa-2x' ></span>" data-off="<span class='fa fa-code fa-2x'></span>" data-style="ios" data-onstyle="default" data-offstyle="default" type="checkbox">
</div>
</div>
<div id="divBody" class="tab-content">
<div role="tabpanel" id="content_blocks" class="tab-pane fade in active" style="position: relative;">
<div id="toggle" class="modal-content" style="display: none;">
<pre id="pre_previewArduino"></pre>
<div id="btn_group" class="btn-group" role="group">
<button id="btn_saveino" class="btn btn-default">
<span class="fa fa-floppy-o"> </span>
</button>
<button id="btn_copy" class="btn btn-default">
<span class="fa fa-files-o"> </span>
</button>
</div>
</div>
</div>
<div role="tabpanel" id="content_code" class="tab-pane fade">#enter your code here</div>
</div>
<!-- message modal -->
<div class="modal fade" id="message" tabindex="-1" role="dialog" aria-hidden="true" data-keyboard="false" data-backdrop="static" >
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body" >
<div id = "messageDIV"></div>
</div>
</div>
</div>
</div>
<!-- about modal -->
<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="aboutModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<span class="fa fa-2x" class="modal-title" id="aboutModalLabel"></span>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-md-4"><img src="media/logo.png" style="width:128px; height:128px;"/></div>
<div class="col-md-8">
<span class="fa fa-2x" id="versionapp"></span><br /><br />
<span id="aboutBody"></span><br /><br />
<button id="btn_site" class="btn btn-default">
<span class="fa fa-search fa-1_5x" id="span_site"></span>
</button>
<button id="btn_forum" class="btn btn-default">
<span class="fa fa-comments fa-1_5x" id="span_forum"></span>
</button>
<button id="btn_contact" class="btn btn-default">
<span class="fa fa-envelope fa-1_5x" id="span_contact"></span>
</button>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="checkbox" id="verifyUpdate"><span id="span_update"></span><br />
<button id="btn_version" type="button" class="btn btn-xs btn-default"><span id="span_verify_update"></span></button><br />
</div>
</div>
</div>
</div>
<!-- toolbox config modal
<div class="modal fade" id="configModal" tabindex="-1" role="dialog" aria-labelledby="configModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<span class="fa fa-cog fa-2x" class="modal-title" id="configModalLabel"></span>
</div>
<div class="modal-body">
<label id="span_languageMenu"></label>
<select id="languageMenu"></select><br><br>
<div id="divToolbox">
<label id="labelToolboxDefinition"></label>
<select id="toolboxes">
<option value="toolbox_6"selected="selected">Beginner 👶</option>
<option value="toolbox_arduino_all" >Advanced 👨💻</option>
<option value="toolbox_master">Master 👨🚀</option>
</select>
</div>
</div>
<input type="checkbox" name="select_all" id="select_all"/> <span id="span_select_all"> </span>
<div class="modal-body" id="modal-body-config"></div>
<div class="modal-footer">
<button id="btn_valid_config" type="button" class="btn btn-primary"></button>
</div>
</div>
</div>
</div>
-->
<!-- example modal -->
<div class="modal fade" id="exampleModal" >
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" ><span aria-hidden="true">×</span></button>
<span class="fa fa-file-text fa-2x" class="modal-title" id="exampleModalLabel"></span>
</div>
<div class="modal-body">
<div class="table-responsive">
<table class="table table-hover">
<tbody id="includedContent"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- CARD modal -->
<div class="modal fade" id="card" >
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" ><span aria-hidden="true">×</span></button>
<span class="fa fa-microchip fa-2x" class="modal-title" id="cardLabel"></span>
</div>
<div class="modal-body">
<div class="arduino_card_mini_picture_div" style="height: 516px">
<img id="arduino_card_mini_picture" style="max-width: 100%" />
</div>
<select size="14" multiple id="pinout" onchange="BlocklyDuino.cardPicture_change();">
<optgroup label="C / C++">
<option value="OttoESP" >ESP8266</option>
<option value="nanooptiboot">♾ Nano</option>
<option value="nano" >♾ Nano Old </option>s
<option value="Ottoky" >ESP32</option>
<option value="MRTnode" >MRTnode ESP32</option>
<option value="mrtduino" >MRTduino</option>
<option value="uno_bt" >ZUM BT-328</option>
<option value="uno" >♾ Uno</option>
<option value="nona4809">♾ Nano Every</option>
<option value="leonardo" >♾ Leonardo</option>
<option value="micro" >♾ Micro</option>
<option value="mega" >♾ Mega</option>
<option value="mkrwifi1010" >♾ MKR WiFi</option>
</optgroup>
</select>
<br><br>
<div id="infoboard"></div>
<!-- <div class="alert alert-warning" role="alert" id="warning"> -->
</div>
</div>
</div>
</div>
</div>
<!-- USB modal -->
<div class="modal fade" id="usb" >
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body">
<span id="aboutusbLabel"></span>
</div>
</div>
</div>
</div>
<!-- modal_blink -->
<div id="modal_blink" class="modal modal-child" data-modal-parent="#exampleModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<img src="examples//media/powerinputs.png" style="height:500px"/>
</div>
</div>
</div>
</div>
<div id="modal_diy" class="modal modal-child" data-modal-parent="#exampleModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<img src="examples/media/wirediy.png" style="height:500px"/>
</div>
</div>
</div>
</div>
<div id="modal_plus" class="modal modal-child" data-modal-parent="#exampleModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<img src="examples/media/wireplus.png" style="height:750px;"/>
</div>
</div>
</div>
</div>
<div id="modal_eyes" class="modal modal-child" data-modal-parent="#exampleModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<img src="examples/media/wireeyes.png" style="height:750px"/>
</div>
</div>
</div>
</div>
<div id="modal_humanoid" class="modal modal-child" data-modal-parent="#exampleModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<img src="examples/media/wireh.png" style="height:750px"/>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
$(window).load(function(){$(".loading").fadeOut("slow")});
ace.require("ace/ext/language_tools");
var editor = ace.edit("content_code");
editor.setTheme("ace/theme/sqlserver");
editor.session.setTabSize(2);
editor.setShowPrintMargin(false);
require('../resources/app/index.js');
require('../resources/app/factory.js');
</script>
</html>