-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.xml
More file actions
3 lines (2 loc) · 2.59 KB
/
project.xml
File metadata and controls
3 lines (2 loc) · 2.59 KB
1
2
3
<xml xmlns="https://developers.google.com/blockly/xml"><block type="ultra_sonic_sensor_setup" id="r[Fd!IgjiMYv92s2Jra%" x="16" y="8"><field name="PIN_TRIG">11</field><field name="PIN_ECHO">10</field><field name="LOOP">1</field><field name="cm">1</field><field name="COPY_SAME">FALSE</field><comment pinned="false" h="180" w="460">This block will setup the Ultrasonic sensor, which measures distance. It uses ultra-sonic sound waves to do this.
Below ---- is where you can set values that the virtual circuit will take in.</comment><data>[{"cm":1,"loop":1,"blockName":"ultra_sonic_sensor_setup"},{"cm":1,"loop":2,"blockName":"ultra_sonic_sensor_setup"},{"cm":1,"loop":3,"blockName":"ultra_sonic_sensor_setup"}]</data></block><block type="arduino_loop" id="27kD|6-TyP[mrDpMor;k" deletable="false" x="28" y="211"><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="wZ$FEN/cw#vKT*oSUbRd"><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_compare" id="bmsExsMrm:+hn(`4XOi/"><field name="OP">LT</field><comment pinned="false" h="140" w="527">Compares what is in the left and right and returns true or false.</comment><value name="A"><block type="ultra_sonic_sensor_motion" id="Kf8-p_?N8(8OaWEHOO4G"><comment pinned="false" h="60" w="460">Returns the number of centimeters the sensor sensed.</comment></block></value><value name="B"><block type="math_arithmetic" id="6{.hsj!J*0#qEc^4pG=,"><field name="OP">MULTIPLY</field><value name="A"><block type="math_number" id="DBndsmsbg9-{=}.^9uGN"><field name="NUM">2</field></block></value><value name="B"><block type="math_number" id="Kt.Z,A7_Yd$9#]^#l6)c"><field name="NUM">3</field></block></value></block></value></block></value><statement name="DO0"><block type="led" id="[UF,%~|u]pWoaM}(E%v%"><field name="COLOR">#ff0000</field><field name="PIN">13</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="ToC0*~[HjRo^/%H@9U+#"><field name="COLOR">#ff0000</field><field name="PIN">13</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></block></statement></block></xml>