-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject.xml
More file actions
11 lines (7 loc) · 5.74 KB
/
project.xml
File metadata and controls
11 lines (7 loc) · 5.74 KB
1
2
3
4
5
6
7
8
9
10
11
<xml xmlns="https://developers.google.com/blockly/xml"><block type="temp_setup" id="bELt%oL1s31+B%{4hpr1" x="-12" y="-1174"><field name="PIN">2</field><field name="TYPE">DHT11</field><field name="LOOP">1</field><field name="temp">30</field><field name="humidity">5</field><field name="COPY_SAME">FALSE</field><comment pinned="false" h="160" w="460">This sensor will read the temperature in Celius and the humidity. Be sure to specify the sensor type.
Below ---- is where you can set values that the virtual circuit will take in.</comment><data>[{"temp":30,"humidity":5,"loop":2,"blockName":"temp_setup"},{"temp":30,"humidity":5,"loop":3,"blockName":"temp_setup"},{"temp":30,"humidity":5,"loop":1,"blockName":"temp_setup"}]</data></block><block type="message_setup" id="flP7{+T|D|m72{M(#BAz" x="-303" y="-1128"><field name="LOOP">1</field><field name="receiving_message">TRUE</field><field name="message">Hello World :)</field><field name="COPY_SAME">FALSE</field><comment pinned="false" h="100" w="460">This block allows you to send messages from the Arduino and the Arduino to send your computer messages.</comment><data>[{"receiving_message":true,"message":"Hello World :)","loop":2,"blockName":"message_setup"},{"receiving_message":true,"message":"Hello World :)","loop":3,"blockName":"message_setup"},{"receiving_message":true,"message":"Hello World :)","loop":1,"blockName":"message_setup"}]</data></block><block type="arduino_loop" id="2Hs.yA=FsGbrPWdKv#a~" deletable="false" x="-344" y="-808"><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="arduino_send_message" id="5x;J*|EtTY~Iaw|4_b,g"><comment pinned="false" h="80" w="460">This block will send a message from the Arduino to the computer.</comment><value name="MESSAGE"><block type="number_to_string" id="2b]N$:kmH#z1W_Y/!D}$"><field name="PRECISION">2</field><comment pinned="false" h="190" w="460">This block turns a number into a text block. The precision controls how many decimal places of the number will be turned into text.
Let’s say you have 5.23234, and you specify 2 for the precision. The text block that this block would return “5.23”.</comment><value name="NUMBER"><block type="temp_get_temp" id="ZG_v)DQ+?axErU%O_|pj"><comment pinned="false" h="60" w="460">Returns the temperature in Celius.</comment></block></value></block></value><next><block type="arduino_send_message" id="Q7qwowcnjUW-fR[[^O^q"><comment pinned="false" h="80" w="460">This block will send a message from the Arduino to the computer.</comment><value name="MESSAGE"><block type="number_to_string" id="K`~/a2efh?Y@wYWh~Svw"><field name="PRECISION">2</field><comment pinned="false" h="190" w="460">This block turns a number into a text block. The precision controls how many decimal places of the number will be turned into text.
Let’s say you have 5.23234, and you specify 2 for the precision. The text block that this block would return “5.23”.</comment><value name="NUMBER"><block type="temp_get_humidity" id="j+=d+ESzGQLAMf0WMq|*"><comment pinned="false" h="60" w="460">Returns the humidity percentage.</comment></block></value></block></value><next><block type="controls_ifelse" id="Vx5.m_a6%(!qe%(Q]JFC"><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=",,M6lgTgjv/6[@IwaXxn"><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="logic_compare" id="x)UoI7~|`KzDI)[9_4fS"><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="temp_get_temp" id="Oo/-yw]OBakZ@/,S~QpG"><comment pinned="false" h="60" w="460">Returns the temperature in Celius.</comment></block></value><value name="B"><block type="math_number" id="-j@dz*,zz_6|G!h/];jv"><field name="NUM">20</field></block></value></block></value><value name="B"><block type="logic_compare" id="_.QOIN{JkHizb4dRQ._J"><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="temp_get_humidity" id="M,c8kcq/b$,SzA`%^C-J"><comment pinned="false" h="60" w="460">Returns the humidity percentage.</comment></block></value><value name="B"><block type="math_number" id=".DEx9w6?lDdE69e3G.D,"><field name="NUM">50</field></block></value></block></value></block></value><statement name="DO0"><block type="led" id="!22m(HZk@#cdG9nLI|r#"><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="7a0BeA$r?Msc.|#ByT|S"><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><next><block type="delay_block" id="Xtj0MrC=7W|sKj[OxG#v"><comment pinned="false" h="90" w="460">
Wait for the given/defined seconds.</comment><value name="DELAY"><block type="math_number" id="t%e`D(N~A0C-qVgKmdK1"><field name="NUM">0.2</field></block></value></block></next></block></next></block></next></block></statement></block></xml>