kopia lustrzana https://github.com/backface/turtlestitch
1 wiersz
15 KiB
XML
1 wiersz
15 KiB
XML
<blocks app="Snap! 7dev, https://snap.berkeley.edu" version="2"><block-definition s="🤖 connect to %'ip'" type="command" category="other"><header></header><code></code><translations>ca:🤖 connecta't a _
</translations><inputs><input type="%s">192.168.4.1</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/signada.js</l></list></block><custom-block s="🤖 disconnect"></custom-block><block s="doApplyExtension"><l>sgd_connect(ip)</l><list><block var="ip"/></list></block></script></block-definition><block-definition s="🤖 disconnect" type="command" category="other"><header></header><code></code><translations>ca:🤖 desconnecta't
</translations><inputs></inputs><script><block s="doIf"><custom-block s="🤖 connected"></custom-block><script><block s="doApplyExtension"><l>sgd_disconnect()</l><list><l></l></list></block></script></block></script></block-definition><block-definition s="🤖 connected" type="predicate" category="other"><header></header><code></code><translations>ca:🤖 connectat
</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_connected()</l><list></list></block></block></script></block-definition><block-definition s="play note %'notename' octave %'octave' for %'ms' ms" type="command" category="sound"><header></header><code></code><translations>ca:toca la nota _ a l'octava _ durant _ ms
</translations><inputs><input type="%txt">C<options>C
C#
D
D#
E
F
F#
G
G#
A
A#
B</options></input><input type="%n">1<options>1
2
3
4
5</options></input><input type="%n">100</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>play tone</l><block s="reportNewList"><list><block var="notename"/><block var="octave"/><block var="ms"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="button %'buttonname'" type="predicate" category="sensing"><header></header><code></code><translations>ca:botó _
</translations><inputs><input type="%s" readonly="true"><options>🆗
❌
➡️
⬆️
⬇️
⬅️</options></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><block s="reportJoinWords"><list><block s="reportListItem"><block s="reportListIndex"><block var="buttonname"/><block s="reportNewList"><list><l>🆗</l><l>❌</l><l>➡️</l><l>⬆️</l><l>⬇️</l><l>⬅️</l></list></block></block><block s="reportNewList"><list><l>OK</l><l>cancel</l><l>right</l><l>up</l><l>down</l><l>left</l></list></block></block><l> button</l></list></block><l></l><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></script></block-definition><block-definition s="set LED display $nl %'i1' %'i2' %'i3' %'i4' %'i5' $nl %'i6' %'i7' %'i8' %'i9' %'i10' $nl %'i11' %'i12' %'i13' %'i14' %'i15' $nl %'i16' %'i17' %'i18' %'i19' %'i20' $nl %'i21' %'i22' %'i23' %'i24' %'i25'" type="command" category="pen"><header></header><code></code><translations>ca:dibuixa a la pantalla _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
</translations><inputs><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">true</input><input type="%b">false</input><input type="%b">true</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">true</input><input type="%b">false</input><input type="%b">false</input><input type="%b">false</input><input type="%b">true</input><input type="%b">false</input><input type="%b">true</input><input type="%b">true</input><input type="%b">true</input><input type="%b">false</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>set display</l><block s="reportNewList"><list><block s="reportJoinWords"><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><l/><l>X</l><l>O</l></block></autolambda><list></list></block><block s="reportNewList"><list><block var="i1"/><block var="i2"/><block var="i3"/><block var="i4"/><block var="i5"/><block var="i6"/><block var="i7"/><block var="i8"/><block var="i9"/><block var="i10"/><block var="i11"/><block var="i12"/><block var="i13"/><block var="i14"/><block var="i15"/><block var="i16"/><block var="i17"/><block var="i18"/><block var="i19"/><block var="i20"/><block var="i21"/><block var="i22"/><block var="i23"/><block var="i24"/><block var="i25"/></list></block></block></block></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="move motor %'n' %'steps' steps %'direction'" type="command" category="motion"><header></header><code></code><translations>ca:mou motor _ _ passos _
</translations><inputs><input type="%n">1</input><input type="%n">128</input><input type="%txt" readonly="true">clockwise<options>clockwise
counter-clockwise</options></input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>motor step</l><block s="reportNewList"><list><block var="n"/><block var="steps"/><block var="direction"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="move motor 1 %'direction' and motor 2 %'direction-2' %'steps' steps" type="command" category="motion"><header></header><code></code><translations>ca:mou motor 1 en _ motor 2 en _ _ passos
</translations><inputs><input type="%s" readonly="true">clockwise<options>clockwise
counter-clockwise</options></input><input type="%s" readonly="true">counter-clockwise<options>clockwise
counter-clockwise</options></input><input type="%n">64</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>move motor </l><block s="reportNewList"><list><block var="direction"/><block var="direction-2"/><block var="steps"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="move motor %'n' angle %'angle' °" type="command" category="motion"><header></header><code></code><translations>ca:mou motor _ angle _ °
</translations><inputs><input type="%n">1</input><input type="%n">-90</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>motor angle</l><block s="reportNewList"><list><block var="n"/><block var="angle"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="move motor %'n' %'turns' complete turns" type="command" category="motion"><header></header><code></code><translations>ca:mou motor _ _ voltes completes
</translations><inputs><input type="%n">1</input><input type="%n">3</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>motor turns</l><block s="reportNewList"><list><block var="n"/><block var="turns"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="write %'text' at x: %'x' y: %'y' color %'clr' scale %'scale'" type="command" category="pen"><header></header><code></code><translations>ca:escriu _ a x: _ y: _ color _ escala _
</translations><inputs><input type="%s">Hello, MicroBlocks!</input><input type="%n">10</input><input type="%n">30</input><input type="%s" readonly="true">🔵<options>🔵
🟢
🔴
🟣
🟡
⚪️</options></input><input type="%n">1</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>text</l><block s="reportNewList"><list><block var="text"/><block var="x"/><block var="y"/><block s="reportListItem"><block s="reportIfElse"><block s="reportEquals"><block var="clr"/><l></l></block><l>1</l><block s="reportListIndex"><block var="clr"/><block s="reportNewList"><list><l>🔵</l><l>🟢</l><l>🔴</l><l>🟣</l><l>🟡</l><l>⚪️</l></list></block></block></block><block s="reportNewList"><list><l>255</l><l>65280</l><l>16711680</l><l>16711935</l><l>16776960</l><l>16777215</l></list></block></block><block var="scale"/><l>0</l></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="clear display" type="command" category="pen"><header></header><code></code><translations>ca:neteja pantalla
</translations><inputs></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>clear</l><l></l><l></l></list></block></block></script></block-definition><block-definition s="set LED x: %'x' y: %'y' to %'bool'" type="command" category="pen"><header></header><code></code><translations>ca:posa el LED x: _ y: _ a _
</translations><inputs><input type="%n">3</input><input type="%n">3</input><input type="%b">true</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>set led</l><block s="reportNewList"><list><block var="x"/><block var="y"/><block var="bool"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="display character %'char'" type="command" category="pen"><header></header><code></code><translations>ca:mostra caràcter _
</translations><inputs><input type="%s">A</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>displayCharacter</l><block s="reportNewList"><list><block var="char"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="set digital pin %'pin' to %'bool'" type="command" category="sensing"><header></header><code></code><translations>ca:posa el pin digital _ a _
</translations><inputs><input type="%n">1</input><input type="%b">true</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>set pin</l><block s="reportNewList"><list><block var="pin"/><l>digital</l><block var="bool"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="set analog pin %'pin' to %'value'" type="command" category="sensing"><header></header><code></code><translations>ca:posa el pin analògic _ a _
</translations><inputs><input type="%n">1</input><input type="%n">512</input></inputs><script><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doSetVar"><l>a</l><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>set pin</l><block s="reportNewList"><list><block var="pin"/><l>analog</l><block var="value"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="read digital pin %'pin'" type="predicate" category="sensing"><header></header><code></code><translations>ca:llegeix el pin digital _
</translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>get pin</l><block s="reportNewList"><list><block var="pin"/><l>digital</l></list></block><block s="reportBoolean"><l><bool>false</bool></l></block></list></block></block></script></block-definition><block-definition s="read analog pin %'pin'" type="reporter" category="sensing"><header></header><code></code><translations>ca:llegeix el pin analògic _
</translations><inputs><input type="%n"></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>get pin</l><block s="reportNewList"><list><block var="pin"/><l>analog</l></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="tilt %'axis'" type="reporter" category="sensing"><header></header><code></code><translations>ca:inclinació _
</translations><inputs><input type="%s" readonly="true">x<options>x
y
z</options></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>tilt</l><block s="reportNewList"><list><block var="axis"/></list></block><l>0</l></list></block></block></script></block-definition><block-definition s="acceleration" type="reporter" category="sensing"><variables><list struct="atomic" id="456">memoized response,calling</list></variables><header></header><code></code><translations>ca:acceleració
</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>sensor</l><block s="reportNewList"><list><l>acceleration</l></list></block><l>100</l></list></block></block></script></block-definition><block-definition s="light level" type="reporter" category="sensing"><header></header><code></code><translations>ca:nivell de llum
</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>sensor</l><block s="reportNewList"><list><l>light</l></list></block><l>100</l></list></block></block></script></block-definition><block-definition s="temperature °C" type="reporter" category="sensing"><header></header><code></code><translations>ca:temperatura °C
</translations><inputs></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>sgd_call(blockname, params, defaultresponse)</l><list><l>sensor</l><block s="reportNewList"><list><l>temperature</l></list></block><l>20</l></list></block></block></script></block-definition></blocks> |