-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.xml
More file actions
16 lines (10 loc) · 5.08 KB
/
project.xml
File metadata and controls
16 lines (10 loc) · 5.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<xml xmlns="https://developers.google.com/blockly/xml"><block type="digital_read_setup" id="b2%!ar*kmn7@FNMRO4z3" x="16" y="8"><field name="PIN">7</field><field name="TYPE">TOUCH_SENSOR</field><field name="LOOP">1</field><field name="isOn">TRUE</field><field name="COPY_SAME">FALSE</field><comment pinned="false" h="150" w="460">This block (digital read setup) tells the Arduino which pin is sense electricity.
A pin is a piece of metal connected to the Arduino used to control or sense electricity.
Below ---- is where you can set values that the virtual circuit will take in.</comment><data>[{"isOn":true,"loop":1,"blockName":"digital_read_setup"}]</data></block><block type="digital_read_setup" id="8tC1M/TIavn,YYUfc|,o" x="288" y="12"><field name="PIN">8</field><field name="TYPE">TOUCH_SENSOR</field><field name="LOOP">1</field><field name="isOn">TRUE</field><field name="COPY_SAME">FALSE</field><comment pinned="false" h="150" w="460">This block (digital read setup) tells the Arduino which pin is sense electricity.
A pin is a piece of metal connected to the Arduino used to control or sense electricity.
Below ---- is where you can set values that the virtual circuit will take in.</comment><data>[{"isOn":true,"loop":1,"blockName":"digital_read_setup"}]</data></block><block type="arduino_loop" id="AGT.1kI^[*WNB`_AEJ@J" deletable="false" x="43" y="250"><field name="LOOP_TIMES">3</field><comment pinned="false" h="170" w="460">The void loop function runs over and over again forever</comment><statement name="loop"><block type="controls_ifelse" id="__v+o~NL(3[V[:x@0U+4"><comment pinned="false" h="150" w="460"> It checks a condition using the if statement, executes a block of code if the condition is true, and otherwise executes the code inside the block when the condition is false.</comment><value name="IF0"><block type="logic_operation" id="R{a6H+iH$xf;.i(,:,Ch"><field name="OP">OR</field><comment pinned="false" h="170" w="527">Compares what is in the left and right holes and returns true or false.
If the operator is "and", it will check if both values are equal to true.
If the operator is "or", it will check if one of the values are true.</comment><value name="A"><block type="digital_read" id="#Q)b=P=cnSYh^aLme]Z{"><field name="PIN">8</field><comment pinned="false" h="70" w="460">Returns true if the sensor is sensing something.</comment></block></value><value name="B"><block type="digital_read" id="Ah-atG^x1#q+(D;=E/d5"><field name="PIN">7</field><comment pinned="false" h="70" w="460">Returns true if the sensor is sensing something.</comment></block></value></block></value><statement name="DO0"><block type="led" id="firV9GNTkWjj(R]~4()F"><field name="COLOR">#ff0000</field><field name="PIN">3</field><field name="STATE">ON</field><comment pinned="false" h="145" w="460">Set defined pin to HIGH or LOW to turn on or off the LED light.</comment></block></statement><statement name="ELSE"><block type="led" id=",X^W;H-ghJLf)WReq=YS"><field name="COLOR">#ff0000</field><field name="PIN">3</field><field name="STATE">OFF</field><comment pinned="false" h="145" w="460">Set defined pin to HIGH or LOW to turn on or off the LED light.</comment></block></statement><next><block type="controls_ifelse" id="Jw!h=veSWHhS4Ld_Jc|l"><comment pinned="false" h="150" w="460"> It checks a condition using the if statement, executes a block of code if the condition is true, and otherwise executes the code inside the block when the condition is false.</comment><value name="IF0"><block type="logic_operation" id="S,@^r1k9iA~(`9a0y=Y|"><field name="OP">AND</field><comment pinned="false" h="170" w="527">Compares what is in the left and right holes and returns true or false.
If the operator is "and", it will check if both values are equal to true.
If the operator is "or", it will check if one of the values are true.</comment><value name="A"><block type="digital_read" id="[qjD*[IT~tx-iPiG_6lC"><field name="PIN">8</field><comment pinned="false" h="70" w="460">Returns true if the sensor is sensing something.</comment></block></value><value name="B"><block type="digital_read" id="r|i{|M3A}fw_?`!aubZv"><field name="PIN">7</field><comment pinned="false" h="70" w="460">Returns true if the sensor is sensing something.</comment></block></value></block></value><statement name="DO0"><block type="led" id="eD-}$-Q1cZeV7Zo}X*mP"><field name="COLOR">#ff0000</field><field name="PIN">9</field><field name="STATE">ON</field><comment pinned="false" h="145" w="460">Set defined pin to HIGH or LOW to turn on or off the LED light.</comment></block></statement><statement name="ELSE"><block type="led" id="l97qbKaQdHjYv:_U+{ot"><field name="COLOR">#ff0000</field><field name="PIN">9</field><field name="STATE">OFF</field><comment pinned="false" h="145" w="460">Set defined pin to HIGH or LOW to turn on or off the LED light.</comment></block></statement><next><block type="delay_block" id="1[EAVp(XCNP5w619xs3["><comment pinned="false" h="90" w="460">
Wait for the given/defined seconds.</comment><value name="DELAY"><block type="math_number" id="U[_-e31pozP?!Ik]U/b1"><field name="NUM">0.2</field></block></value></block></next></block></next></block></statement></block></xml>