-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.xml
More file actions
12 lines (8 loc) · 5.31 KB
/
project.xml
File metadata and controls
12 lines (8 loc) · 5.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
<xml xmlns="https://developers.google.com/blockly/xml"><block type="joystick_setup" id="jfI3rav$[{_}ZqgOFeT9" x="-467" y="-679"><field name="PIN_X">A1</field><field name="PIN_Y">A3</field><field name="PIN_BUTTON">9</field><field name="LOOP">1</field><field name="ENGAGED">TRUE</field><field name="DEGREE">0</field><field name="BUTTON_PRESSED">TRUE</field><field name="COPY_SAME">FALSE</field><comment pinned="false" h="400" w="460">Pin X and Pin Y are used to sense the where the joy stick is position. Button pin is used sense whether joystick is being pressed.
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>[{"buttonPressed":true,"degree":0,"engaged":true,"loop":1,"blockName":"joystick_setup"}]</data></block><block type="arduino_loop" id="AGT.1kI^[*WNB`_AEJ@J" deletable="false" x="-480" y="-336"><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="~5JvZX/}E)+(C5^JT9Wv"><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="joystick_button" id="Hn?.j~vu!_|W:Hvv$DvL"><comment pinned="false" h="80" w="460">Returns whether true if someone is pressing down on the joystick.
</comment></block></value><statement name="DO0"><block type="led" id="8tD$je^S#*iU*Q$gr7r]"><field name="COLOR">#ff0000</field><field name="PIN">7</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="y@_kEPxMi+JdN%+y:1gB"><field name="COLOR">#ff0000</field><field name="PIN">7</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="control_if" id="=B}6I[`$o4yTA5IWv8WA"><comment pinned="false" h="150" w="460">The if statement checks a condition and executes the following block of code if the condition is true.</comment><value name="IF0"><block type="logic_compare" id="?x*(Xg_8@{60G/|%l8ps"><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="joystick_angle" id="h[!1vaznseSz;UTEC2vn"><comment pinned="false" h="70" w="460">Return the angle the joystick is positioned in.
</comment></block></value><value name="B"><block type="math_number" id="3+cP|kk)k|~okD4Q{$41"><field name="NUM">100</field></block></value></block></value><statement name="DO0"><block type="led" id="^|BiQrgdD)um;U/=~XAQ"><field name="COLOR">#ff0000</field><field name="PIN">8</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="control_if" id="v4x^5AjX8iO,}#=@#}MR"><comment pinned="false" h="150" w="460">The if statement checks a condition and executes the following block of code if the condition is true.</comment><value name="IF0"><block type="logic_compare" id="CNe1?$Sq{^4#$NOu%IJ="><field name="OP">GT</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="joystick_angle" id="*5QV-xdY_iP^|pX+BG5x"><comment pinned="false" h="70" w="460">Return the angle the joystick is positioned in.
</comment></block></value><value name="B"><block type="math_number" id="!ptGs#8,8$.9:Ses6NRP"><field name="NUM">100</field></block></value></block></value><statement name="DO0"><block type="led" id="T_$)xU/#n5S;YXqBH+V:"><field name="COLOR">#ff0000</field><field name="PIN">8</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><next><block type="controls_ifelse" id="nDMNvhX3!yJ`le[xZvd:"><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="joystick_engaged" id="YQL!ssI.;%BX*}b#F#mc"><comment pinned="false" h="80" w="460">Returns whether true if someone is moving the joystick to a position.
</comment></block></value><statement name="DO0"><block type="led" id=".q{e0BBWZ;F7jkaMRZ=z"><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="a4vex[baD_Yo9|e)b+G4"><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></next></block></next></block></next></block></statement></block></xml>