-
Notifications
You must be signed in to change notification settings - Fork 2
/
extension.js
68 lines (68 loc) · 2.12 KB
/
extension.js
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
({
name: "LCDI2C", // Category Name
description: "Character LCD I2C",
author: "microBlock",
category: "Display",
version: "1.0.0",
icon: "/static/icon.png", // Category icon
color: "#27AE60", // Category color (recommend some blocks color)
blocks: [ // Blocks in Category
"lcd_setup",
{
xml: `
<block type="lcd_show">
<value name="value">
<shadow type="text">
<field name="TEXT">Hello!</field>
</shadow>
</value>
</block>
`
},
{
xml: `
<block type="lcd_show_at">
<value name="value">
<shadow type="text">
<field name="TEXT">Hello!</field>
</shadow>
</value>
<value name="line">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
</value>
<value name="indent">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
`
},
"lcd_clear",
{
xml: `
<block type="lcd_set_cursor">
<value name="line">
<shadow type="math_number">
<field name="NUM">1</field>
</shadow>
</value>
<value name="indent">
<shadow type="math_number">
<field name="NUM">0</field>
</shadow>
</value>
</block>
`
},
"lcd_backlight",
"lcd_display",
"lcd_cursor",
"lcd_scroll_left",
"lcd_scroll_right",
"lcd_go_sleep",
"lcd_exit_sleep"
]
});