Skip to content
Snippets Groups Projects
Commit eef3fa4c authored by ft-Demo's avatar ft-Demo
Browse files

commit by robo pro coding

parent cca12bdd
No related branches found
No related tags found
No related merge requests found
<xml xmlns="https://developers.google.com/blockly/xml" version="14">
<block type="start_block" id="DN^mJ1;up%ZB3(H0BtNd" deletable="false" x="-388" y="-442">
<block type="start_block" id="DN^mJ1;up%ZB3(H0BtNd" deletable="false" x="-442" y="-706">
<statement name="statement">
<block type="motor_set_speed" id="nTe94(WV-mL2-hcY71fi">
<field name="instance_name">BTSmart_M2_motor</field>
......@@ -22,70 +22,64 @@
<block type="motor_stop" id="dtiJ|D]!P:/4xL45hPD{">
<field name="instance_name">BTSmart_M2_motor</field>
<next>
<block type="controls_if" id="9Y.V,oZ(=E:Dh7b{Ayo*">
<value name="IF0">
<block type="input_mini_switch_if_state" id="NKz=ayh8=S`LlH(_3-bj">
<field name="instance_name">BTSmart_I4_mini_switch</field>
<field name="property_name">closed</field>
</block>
</value>
<statement name="DO0">
<block type="motor_set_speed" id="zgHghI#{ZTZfViQCDEk2">
<field name="instance_name">BTSmart_M1_motor</field>
<field name="direction">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="(t$*Sz5^8A4]hON1bfbD">
<field name="MOTOR_NUM">512</field>
</shadow>
<block type="loop_endless" id="X*?KRqC;0BDwI}TvYO2$">
<statement name="DO">
<block type="controls_if" id="9Y.V,oZ(=E:Dh7b{Ayo*">
<value name="IF0">
<block type="input_mini_switch_if_state" id="NKz=ayh8=S`LlH(_3-bj">
<field name="instance_name">BTSmart_I4_mini_switch</field>
<field name="property_name">closed</field>
</block>
</value>
<next>
<block type="util_wait_for" id="HvvT6S]0pJ*S@9v:@$fj">
<statement name="DO0">
<block type="util_wait_for" id="$UzeA6.Y^JSb3@LA[0m2">
<field name="format">s</field>
<value name="value">
<shadow type="math_number" id="]O@G77Bnh$]rfbH9v0*6">
<field name="NUM">0.5</field>
<shadow type="math_number" id=";vhAd1gBNrObU|%[KM?R">
<field name="NUM">0.6</field>
</shadow>
</value>
<next>
<block type="motor_stop" id="h41a*=0a5$bP=yQy*1bK">
<block type="motor_set_speed" id="zgHghI#{ZTZfViQCDEk2">
<field name="instance_name">BTSmart_M1_motor</field>
<field name="direction">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="(t$*Sz5^8A4]hON1bfbD">
<field name="MOTOR_NUM">512</field>
</shadow>
</value>
<next>
<block type="util_wait_for" id="rCWLfIcN_ouZ+[.^?Tn|">
<block type="util_wait_for" id="HvvT6S]0pJ*S@9v:@$fj">
<field name="format">s</field>
<value name="value">
<shadow type="math_number" id="P8B8Y%zg0uP-5KZv@@8A">
<shadow type="math_number" id="]O@G77Bnh$]rfbH9v0*6">
<field name="NUM">0.5</field>
</shadow>
</value>
<next>
<block type="motor_set_speed" id="CGDPu5?8MOe=-Dp[^FcB">
<field name="instance_name">BTSmart_M2_motor</field>
<field name="direction">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="GztRoWNor#ELq9DL`]/k">
<field name="MOTOR_NUM">512</field>
</shadow>
</value>
<block type="motor_stop" id="h41a*=0a5$bP=yQy*1bK">
<field name="instance_name">BTSmart_M1_motor</field>
<next>
<block type="controls_whileUntil" id="F{soZLKN:P,~/,nSB{Nz">
<field name="MODE">UNTIL</field>
<value name="BOOL">
<block type="input_mini_switch_if_state" id="A:%l2Xq0`MZ(@BlWqFI$">
<field name="instance_name">BTSmart_I4_mini_switch</field>
<field name="property_name">open</field>
</block>
<block type="motor_set_speed" id="CGDPu5?8MOe=-Dp[^FcB">
<field name="instance_name">BTSmart_M2_motor</field>
<field name="direction">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="GztRoWNor#ELq9DL`]/k">
<field name="MOTOR_NUM">512</field>
</shadow>
</value>
<next>
<block type="motor_stop" id="M*)NFsHtWo-RCnW0uIuc">
<field name="instance_name">BTSmart_M1_motor</field>
<block type="controls_whileUntil" id="F{soZLKN:P,~/,nSB{Nz">
<field name="MODE">UNTIL</field>
<value name="BOOL">
<block type="input_mini_switch_if_state" id="A:%l2Xq0`MZ(@BlWqFI$">
<field name="instance_name">BTSmart_I4_mini_switch</field>
<field name="property_name">open</field>
</block>
</value>
<next>
<block type="util_wait_for" id="j{:jJC+p%La6;cYm!;8#">
<field name="format">s</field>
<value name="value">
<shadow type="math_number" id="LqC)q-Pd/2A6at;$zuk!">
<field name="NUM">0.5</field>
</shadow>
</value>
<block type="motor_stop" id="M*)NFsHtWo-RCnW0uIuc">
<field name="instance_name">BTSmart_M1_motor</field>
<next>
<block type="motor_set_speed" id="GwjQrc2c4#Q73i(y=z#l">
<field name="instance_name">BTSmart_M2_motor</field>
......@@ -121,7 +115,7 @@
<field name="format">s</field>
<value name="value">
<shadow type="math_number" id="G:xY#goYg,$0MzHObr@@">
<field name="NUM">0.5</field>
<field name="NUM">0.4</field>
</shadow>
</value>
<next>
......@@ -152,7 +146,7 @@
</block>
</next>
</block>
</next>
</statement>
</block>
</statement>
</block>
......
......@@ -3,23 +3,25 @@ while (!(await BTSmart_I2_mini_switch.isClosed())) {
await Utility.sleep(10);
}
await BTSmart_M2_motor.stop();
if (await BTSmart_I4_mini_switch.isClosed()) {
await BTSmart_M1_motor.setSpeed(512, Motor.CW);
await Utility.sleep(500);
await BTSmart_M1_motor.stop();
await Utility.sleep(500);
await BTSmart_M2_motor.setSpeed(512, Motor.CW);
while (!(await BTSmart_I4_mini_switch.isOpen())) {
await Utility.sleep(10);
while(true) {
if (await BTSmart_I4_mini_switch.isClosed()) {
await Utility.sleep(600);
await BTSmart_M1_motor.setSpeed(512, Motor.CW);
await Utility.sleep(500);
await BTSmart_M1_motor.stop();
await BTSmart_M2_motor.setSpeed(512, Motor.CW);
while (!(await BTSmart_I4_mini_switch.isOpen())) {
await Utility.sleep(10);
}
await BTSmart_M1_motor.stop();
await BTSmart_M2_motor.setSpeed(512, Motor.CCW);
while (!(await BTSmart_I2_mini_switch.isClosed())) {
await Utility.sleep(10);
}
await BTSmart_M2_motor.stop();
await BTSmart_M1_motor.setSpeed(512, Motor.CCW);
await Utility.sleep(400);
await BTSmart_M1_motor.stop();
}
await BTSmart_M1_motor.stop();
await Utility.sleep(500);
await BTSmart_M2_motor.setSpeed(512, Motor.CCW);
while (!(await BTSmart_I2_mini_switch.isClosed())) {
await Utility.sleep(10);
}
await BTSmart_M2_motor.stop();
await BTSmart_M1_motor.setSpeed(512, Motor.CCW);
await Utility.sleep(500);
await BTSmart_M1_motor.stop();
await Utility.sleep(10);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment