forked from microBlock-IDE/Ultrasonic-extension
-
Notifications
You must be signed in to change notification settings - Fork 1
/
extension.js
29 lines (29 loc) · 985 Bytes
/
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
({
name: "Ultrasonic2", // Category Name
description: "Get distance from ultrasonic sensor (support any boards)",
author: "microBlock",
category: "Sensors",
version: "1.0.0",
icon: "/static/icon.png", // Category icon
color: "#004098", // Category color (recommend some blocks color)
blocks: [ // Blocks in Category
{
xml: `
<block type="ultrasonic_read">
<value name="trig_pin">
<shadow type="math_number">
<field name="NUM">2</field>
</shadow>
</value>
<value name="echo_pin">
<shadow type="math_number">
<field name="NUM">3</field>
</shadow>
</value>
</block>
`
}
],
supportArduinoPlatform: true,
depends: [ ] // Arduino library
});