-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSimpleDistanceSensorBlock.blk
More file actions
77 lines (77 loc) · 2.47 KB
/
SimpleDistanceSensorBlock.blk
File metadata and controls
77 lines (77 loc) · 2.47 KB
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
<xml xmlns="https://developers.google.com/blockly/xml">
<block type="procedures_defnoreturn" id="WtpyD@tEu+EoY=P9iY,D" deletable="false" x="25" y="169">
<field name="NAME">runOpMode</field>
<comment pinned="true" h="141" w="577">This sample contains the bare minimum Blocks for any regular OpMode. The 3 blue
Comment Blocks show where to place Initialization code (runs once, after touching the
DS INIT button, and before touching the DS Start arrow), Run code (runs once, after
touching Start), and Loop code (runs repeatedly while the OpMode is active, namely not
Stopped).</comment>
<data>{"commentPositionLeft":-20,"commentPositionTop":-169}</data>
<statement name="STACK">
<block type="comment" id="Lc#BFtj*NTB48YL;eBl.">
<field name="COMMENT">Put initialization blocks here.</field>
<next>
<block type="linearOpMode_waitForStart" id=":`$wN_ci`O;o6P0~.(+g">
<next>
<block type="controls_if" id="}Q?5mbxSO8Di;i!__6[y">
<value name="IF0">
<block type="linearOpMode_opModeIsActive" id=")o%YFX/#9kvv^sgXr4~5"/>
</value>
<statement name="DO0">
<block type="comment" id="(rU-p_T_/B|vExcs}liL">
<field name="COMMENT">Put run blocks here.</field>
<next>
<block type="controls_whileUntil" id="^0Kagy/e+Ea{rbZPv2G6">
<field name="MODE">WHILE</field>
<value name="BOOL">
<block type="linearOpMode_opModeIsActive" id="e)cr{!2VIET83s,JWC.="/>
</value>
<statement name="DO">
<block type="comment" id="Jh/;L$n@JuX8AQJDFCul">
<field name="COMMENT">Put loop blocks here.</field>
<next>
<block type="telemetry_update" id="exvivmft-pX$n!1,8Ea$">
<next>
<block type="telemetry_addNumericData_Number" id="OIH)Usx#dQ36|U,|u?Yl">
<value name="KEY">
<shadow type="text" id="}nk/Fb6BXSZTPRRIp)!Q">
<field name="TEXT">getDistance</field>
</shadow>
</value>
<value name="NUMBER">
<shadow type="math_number" id="/o~0(zzOYYLl)U[D70}O">
<field name="NUM">123</field>
</shadow>
<block type="distanceSensor_getDistance" id="T`XUL+r=PiK9)[`7^SN6">
<field name="IDENTIFIER">distanceSensorAsDistanceSensor</field>
<data>{"IDENTIFIER":"distanceSensor"}</data>
<value name="DISTANCE_UNIT">
<shadow type="navigation_typedEnum_distanceUnit" id="I])Hf9$WnLI=S:I1L7lP">
<field name="DISTANCE_UNIT">MM</field>
</shadow>
</value>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</xml>
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<Extra>
<OpModeMeta flavor="TELEOP" group="" autoTransition="" />
<Enabled value="true" />
</Extra>