Skip to content

Commit

Permalink
Add BlocklyDuino Code
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcherHuang committed Jul 12, 2017
1 parent 2d7a339 commit 0047d49
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions BlocklyDuino/blockduino (Grove - DHT OLED).xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="initializes_setup" id="6" x="38" y="13"><next><block type="initializes_loop" id="10"><statement name="CONTENT"><block type="variables_set" id="77" inline="true"><field name="TYPE">Number</field><field name="VAR">Humidity</field><value name="VALUE"><block type="grove_temporature_humidity_sensor" id="100"><field name="PIN">2</field><field name="UNIT">h</field></block></value><next><block type="variables_set" id="99" inline="true"><field name="TYPE">Number</field><field name="VAR">Temperature</field><value name="VALUE"><block type="grove_temporature_humidity_sensor" id="78"><field name="PIN">2</field><field name="UNIT">c</field></block></value><next><block type="serial_print" id="17" inline="false"><value name="CONTENT"><block type="text" id="18"><field name="TEXT">溼度:</field></block></value><next><block type="serial_println" id="25" inline="false"><value name="CONTENT"><block type="variables_get" id="107"><field name="TYPE">Number</field><field name="VAR">Humidity</field></block></value><next><block type="serial_print" id="31" inline="false"><value name="CONTENT"><block type="text" id="32"><field name="TEXT">溫度:</field></block></value><next><block type="serial_println" id="33" inline="false"><value name="CONTENT"><block type="variables_get" id="114"><field name="TYPE">Number</field><field name="VAR">Temperature</field></block></value><next><block type="grove_oled_display_clear" id="50"><next><block type="grove_oled_display_set_cursor" id="58" inline="true"><value name="ROW"><block type="math_number" id="59"><field name="NUM">0</field></block></value><value name="COL"><block type="math_number" id="60"><field name="NUM">0</field></block></value><next><block type="grove_oled_display_put" id="123" inline="true"><field name="TYPE">String</field><value name="VALUE"><block type="text" id="129"><field name="TEXT">Temperature:</field></block></value><next><block type="grove_oled_display_put" id="68" inline="true"><field name="TYPE">Number</field><value name="VALUE"><block type="variables_get" id="85"><field name="TYPE">Number</field><field name="VAR">Temperature</field></block></value><next><block type="grove_oled_display_set_cursor" id="69" inline="true"><value name="ROW"><block type="math_number" id="70"><field name="NUM">1</field></block></value><value name="COL"><block type="math_number" id="71"><field name="NUM">0</field></block></value><next><block type="grove_oled_display_put" id="132" inline="true"><field name="TYPE">String</field><value name="VALUE"><block type="text" id="133"><field name="TEXT">Humidity:</field></block></value><next><block type="grove_oled_display_put" id="72" inline="true"><field name="TYPE">Number</field><value name="VALUE"><block type="variables_get" id="115"><field name="TYPE">Number</field><field name="VAR">Humidity</field></block></value><next><block type="delay_custom" id="41" inline="false"><value name="DELAY_TIME"><block type="math_number" id="42"><field name="NUM">1000</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></xml>
1 change: 1 addition & 0 deletions BlocklyDuino/blockduino (Grove - DHT).xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="initializes_setup" id="6" x="38" y="38"><next><block type="initializes_loop" id="10"><statement name="CONTENT"><block type="serial_print" id="17" inline="false"><value name="CONTENT"><block type="text" id="18"><field name="TEXT">溼度:</field></block></value><next><block type="serial_println" id="25" inline="false"><value name="CONTENT"><block type="grove_temporature_humidity_sensor" id="30"><field name="PIN">2</field><field name="UNIT">h</field></block></value><next><block type="serial_print" id="31" inline="false"><value name="CONTENT"><block type="text" id="32"><field name="TEXT">溫度:</field></block></value><next><block type="serial_println" id="33" inline="false"><value name="CONTENT"><block type="grove_temporature_humidity_sensor" id="34"><field name="PIN">2</field><field name="UNIT">c</field></block></value><next><block type="delay_custom" id="41" inline="false"><value name="DELAY_TIME"><block type="math_number" id="42"><field name="NUM">1000</field></block></value></block></next></block></next></block></next></block></next></block></statement></block></next></block></xml>
1 change: 1 addition & 0 deletions BlocklyDuino/blockduino (Grove - LED Bar).xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="initializes_setup" id="6" x="38" y="13"><next><block type="initializes_loop" id="10"><statement name="CONTENT"><block type="controls_for" id="145" inline="true"><field name="VAR">i</field><value name="FROM"><block type="math_number" id="146"><field name="NUM">0</field></block></value><value name="TO"><block type="math_number" id="147"><field name="NUM">10</field></block></value><statement name="DO"><block type="grove_led_bar" id="159" inline="true"><field name="PIN">2</field><value name="LEVEL"><block type="variables_get" id="165"><field name="TYPE">Number</field><field name="VAR">i</field></block></value><next><block type="delay_custom" id="166" inline="false"><value name="DELAY_TIME"><block type="math_number" id="167"><field name="NUM">1000</field></block></value></block></next></block></statement><next><block type="delay_custom" id="41" inline="false"><value name="DELAY_TIME"><block type="math_number" id="42"><field name="NUM">1000</field></block></value></block></next></block></statement></block></next></block></xml>
1 change: 1 addition & 0 deletions BlocklyDuino/blockduino (Grove - Light Sensor).xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="initializes_setup" id="6" x="38" y="88"><next><block type="initializes_loop" id="10"><statement name="CONTENT"><block type="serial_print" id="174" inline="false"><value name="CONTENT"><block type="text" id="175"><field name="TEXT">光感:</field></block></value><next><block type="serial_println" id="186" inline="false"><value name="CONTENT"><block type="grove_light_sensor" id="179"><field name="PIN">A0</field></block></value><next><block type="delay_custom" id="41" inline="false"><value name="DELAY_TIME"><block type="math_number" id="42"><field name="NUM">1000</field></block></value></block></next></block></next></block></statement></block></next></block></xml>
1 change: 1 addition & 0 deletions BlocklyDuino/blockduino (MCS - DHT).xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="initializes_setup" id="6" x="38" y="88"><statement name="CONTENT"><block type="serial_println" id="211" inline="false"><value name="CONTENT"><block type="text" id="212"><field name="TEXT">Wi-Fi 開始連線</field></block></value><next><block type="linkit_wifi_wait_until_ready" id="200" inline="false"><value name="SSID"><block type="text" id="201"><field name="TEXT"></field></block></value><value name="PASSWORD"><block type="text" id="202"><field name="TEXT"></field></block></value><next><block type="serial_println" id="213" inline="false"><value name="CONTENT"><block type="text" id="214"><field name="TEXT">Wi-Fi 連線成功</field></block></value><next><block type="mcs" id="234" inline="false"><value name="DEVICEID"><block type="text" id="235"><field name="TEXT">DnpPXoMl</field></block></value><value name="DEVICEKEY"><block type="text" id="236"><field name="TEXT">mUD0KVCCa8du7OoP</field></block></value><statement name="CONTENT"><block type="mcs_set_display_channel" id="256" inline="true"><field name="TYPE">int</field><value name="DISPLAY_CHANNEL"><block type="text" id="257"><field name="TEXT">Temperature</field></block></value><next><block type="mcs_set_display_channel" id="258" inline="true"><field name="TYPE">int</field><value name="DISPLAY_CHANNEL"><block type="text" id="259"><field name="TEXT">Humidity</field></block></value></block></next></block></statement><next><block type="serial_println" id="260" inline="false"><value name="CONTENT"><block type="text" id="261"><field name="TEXT">MCS 連線成功</field></block></value></block></next></block></next></block></next></block></next></block></statement><next><block type="initializes_loop" id="10"><statement name="CONTENT"><block type="mcs_process" id="281"><next><block type="variables_set" id="295" inline="true"><field name="TYPE">Number</field><field name="VAR">Temp</field><value name="VALUE"><block type="grove_temporature_humidity_sensor" id="299"><field name="PIN">2</field><field name="UNIT">c</field></block></value><next><block type="variables_set" id="347" inline="true"><field name="TYPE">Number</field><field name="VAR">Humi</field><value name="VALUE"><block type="grove_temporature_humidity_sensor" id="300"><field name="PIN">2</field><field name="UNIT">h</field></block></value><next><block type="mcs_channel2_value" id="320" inline="true"><value name="CHANNEL2_VALUE"><block type="text" id="321"><field name="TEXT">Temperature</field></block></value><value name="SET_VALUE"><block type="variables_get" id="337"><field name="TYPE">Number</field><field name="VAR">Temp</field></block></value><next><block type="mcs_channel2_value" id="322" inline="true"><value name="CHANNEL2_VALUE"><block type="text" id="323"><field name="TEXT">Humidity</field></block></value><value name="SET_VALUE"><block type="variables_get" id="330"><field name="TYPE">Number</field><field name="VAR">Temp</field></block></value><next><block type="serial_print" id="364" inline="false"><value name="CONTENT"><block type="text" id="365"><field name="TEXT">溫度:</field></block></value><next><block type="serial_println" id="354" inline="false"><value name="CONTENT"><block type="variables_get" id="374"><field name="TYPE">Number</field><field name="VAR">Temp</field></block></value><next><block type="serial_print" id="366" inline="false"><value name="CONTENT"><block type="text" id="367"><field name="TEXT">溼度:</field></block></value><next><block type="serial_println" id="356" inline="false"><value name="CONTENT"><block type="variables_get" id="381"><field name="TYPE">Number</field><field name="VAR">Humi</field></block></value><next><block type="delay_custom" id="41" inline="false"><value name="DELAY_TIME"><block type="math_number" id="42"><field name="NUM">1000</field></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></xml>

0 comments on commit 0047d49

Please sign in to comment.