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

commit by robo pro coding

parent 19427556
No related branches found
No related tags found
No related merge requests found
<xml xmlns="https://developers.google.com/blockly/xml" version="14">
<xml xmlns="https://developers.google.com/blockly/xml" version="16">
<block type="start_block" id="$#]ESP+D}J$B]GY;Y`zp" deletable="false" x="-68" y="-133">
<statement name="statement">
<block type="util_thread" id="nOZkJ)D$n=;X^0bV*uy_">
<field name="dropdown_event">]$}!d~iPi$faCfYn-,02</field>
<field name="dropdown_event">{"id":"]$}!d~iPi$faCfYn-,02","filename":"lib/sorting_line.py"}</field>
<next>
<block type="util_thread" id="(0KVNNY(~d{_r/:Z)Y^$">
<field name="dropdown_event">O(u{V%63EG)8#o`:]GxN</field>
<field name="dropdown_event">{"id":"O(u{V%63EG)8#o`:]GxN","filename":"lib/machine_learning.py"}</field>
<next>
<block type="loop_endless" id="]bji@o6zCyG=6j.U__2I"/>
</next>
......
<xml type="camera" version="2" camera_name="TXT_SLD_M_USB1_1_camera"/>
\ No newline at end of file
<xml type="camera" version="4" name="TXT_SLD_M_USB1_1_camera"/>
\ No newline at end of file
<xml xmlns="https://developers.google.com/blockly/xml" version="14">
<xml xmlns="https://developers.google.com/blockly/xml" version="16">
<block type="txt4_controller" id="[v6x3J=Tm+dMJAsQlQOi" x="588" y="-472">
<mutation>
<arg type="Input" name="Input-0" value="I1"/>
......
<xml type="display" version="2"><item id="33" class="TXTLabel"><name>img_label</name><text/><geometry><x>20</x><y>20</y><width>200</width><height>150</height></geometry></item><item id="20" class="StatusIndicator"><name>red</name><color>#EC1600</color><active>false</active><geometry><x>20</x><y>195</y><width>35</width><height>35</height></geometry></item><item id="22" class="StatusIndicator"><name>blue</name><color>#005693</color><active>false</active><geometry><x>100</x><y>195</y><width>35</width><height>35</height></geometry></item><item id="23" class="StatusIndicator"><name>fail</name><color>#E7AE13</color><active>false</active><geometry><x>185</x><y>195</y><width>35</width><height>35</height></geometry></item><item id="24" class="TXTLabel"><name>version_label</name><text>Add-On AI: Version 2023/04/20</text><geometry><x>20</x><y>0</y><width>200</width><height>20</height></geometry></item><item id="28" class="TXTLabel"><name>part_pass_fail</name><text/><geometry><x>20</x><y>170</y><width>200</width><height>20</height></geometry></item></xml>
\ No newline at end of file
<xml type="display" version="2"><item id="33" class="TXTLabel"><name>img_label</name><text/><fontSize>16</fontSize><fontStyle/><horizontalAlignment>left</horizontalAlignment><color>#ffffff</color><geometry><x>20</x><y>20</y><width>200</width><height>150</height></geometry></item><item id="20" class="StatusIndicator"><name>red</name><color>#EC1600</color><active>false</active><geometry><x>20</x><y>195</y><width>35</width><height>35</height></geometry></item><item id="22" class="StatusIndicator"><name>blue</name><color>#005693</color><active>false</active><geometry><x>100</x><y>195</y><width>35</width><height>35</height></geometry></item><item id="23" class="StatusIndicator"><name>fail</name><color>#E7AE13</color><active>false</active><geometry><x>185</x><y>195</y><width>35</width><height>35</height></geometry></item><item id="24" class="TXTLabel"><name>version_label</name><text>Add-On AI: Version 2023/04/20</text><fontSize>16</fontSize><fontStyle/><horizontalAlignment>left</horizontalAlignment><color>#ffffff</color><geometry><x>20</x><y>0</y><width>200</width><height>20</height></geometry></item><item id="28" class="TXTLabel"><name>part_pass_fail</name><text/><fontSize>16</fontSize><fontStyle/><horizontalAlignment>left</horizontalAlignment><color>#ffffff</color><geometry><x>20</x><y>170</y><width>200</width><height>20</height></geometry></item></xml>
\ No newline at end of file
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -65,7 +65,8 @@ def MakePictureRunKiReturnFoundPart():
hue = color[0] # range 0-180
sat = color[2] # range 0-255
ts_process0 = (time.time() * 1000)
detector = ObjectDetector('/opt/ft/workspaces/machine-learning/object-detection/sorting_line/model.tflite', '/opt/ft/workspaces/machine-learning/object-detection/sorting_line/labels.txt')
detector = ObjectDetector('/opt/ft/workspaces/machine-learning-user/models/sorting_line/model.tflite', '/opt/ft/workspaces/machine-learning-user/models/sorting_line/labels.txt')
#your python code
ts_process1 = (time.time() * 1000)
led_on = True
result = detector.process_image(frame)
......
<xml xmlns="https://developers.google.com/blockly/xml" version="14">
<xml xmlns="https://developers.google.com/blockly/xml" version="16">
<variables>
<variable id="D/@C/pn3UWR*ove]Ratv">MovementSpeedCam</variable>
<variable id="_d{~w$eD*:d:}xT$1Gn^">MovementSpeed</variable>
......@@ -104,7 +104,7 @@
<field name="NAME">moveRefM2</field>
<statement name="STACK">
<block type="motor_set_speed" id="EcmXtEb26D15JRM3t0JO">
<field name="instance_name">TXT_SLD_M_M2_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-)Eq*8C-!QYXfX/2!QXeH</field>
<field name="direction">Motor.CW</field>
<value name="speed">
<shadow type="motor_number" id="2qy=15?s`qS^Mn0,rQWl">
......@@ -115,13 +115,13 @@
<block type="util_wait_until" id="4W`54g-oK-;fb8JZ8fxM">
<value name="value">
<block type="input_mini_switch_if_state" id="8)VTRQ=`J/d/H%X,$GL3">
<field name="instance_name">TXT_SLD_M_I2_mini_switch</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-0/,xi7n3}c2!E^qfOh?$</field>
<field name="property_name">closed</field>
</block>
</value>
<next>
<block type="motor_stop" id="sq`;d?l,@{Gh0BROB_Rm">
<field name="instance_name">TXT_SLD_M_M2_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-)Eq*8C-!QYXfX/2!QXeH</field>
<field name="value">true</field>
</block>
</next>
......@@ -136,7 +136,7 @@
<block type="controls_if" id="4H`AQ+![PHR,)B9=[ZZs">
<value name="IF0">
<block type="input_photo_transistor_if_state" id="%uKHFV:P;xn5`jXe)`fg">
<field name="instance_name">TXT_SLD_M_I1_photo_transistor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-q8b-=jiA!QN*/0L=SU|;</field>
<field name="property_name">dark</field>
</block>
</value>
......@@ -145,9 +145,9 @@
<mutation name="moveRefM2"/>
<next>
<block type="import_function_noreturn" id="QmQ4h+e+9f$.Qj#TS)%;">
<mutation parentId="F@f@v^pR#?_8P}+B#yjS"/>
<mutation parentId="F@f@v^pR#?_8P}+B#yjS" parentFilename="lib/machine_learning.py"/>
<field name="name">reset_inteface</field>
<data>F@f@v^pR#?_8P}+B#yjS</data>
<data>{"id":"F@f@v^pR#?_8P}+B#yjS","filename":"lib/machine_learning.py"}</data>
<next>
<block type="text_print" id="WP%z`sjuSQrcQtJj4|h-">
<value name="TEXT">
......@@ -157,7 +157,7 @@
</value>
<next>
<block type="encodermotor_set_speed" id="aT*8+qnMe_iGx{_Np3=F">
<field name="instance_name_0">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="])`k29^n..9`pjhzfB6C">
......@@ -204,7 +204,7 @@
<block type="logic_negate" id="W1^NE~TeAZa.3=q|3A*3">
<value name="BOOL">
<block type="input_photo_transistor_if_state" id=";(te{x~aX)Nqg=7^;;_5">
<field name="instance_name">TXT_SLD_M_I1_photo_transistor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-q8b-=jiA!QN*/0L=SU|;</field>
<field name="property_name">dark</field>
</block>
</value>
......@@ -229,10 +229,10 @@
</statement>
<next>
<block type="encodermotor_stop" id="WWwMF+AqCD=w2R|iIH[w">
<field name="instance_name_0">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
<next>
<block type="encodermotor_set_values" id="xNQ`QF}M-_z:.4c$GJ:`">
<field name="instance_name_0">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="6mR#1dPsJ*/8uvJt55xk">
......@@ -254,7 +254,7 @@
<block type="util_wait_until" id="pTB%e?dhCB{JCVUY8@G0">
<value name="value">
<block type="encodermotor_position_read" id="i3k0bo~8HiqqW]OYQdn{">
<field name="instance_name">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
</block>
</value>
<next>
......@@ -269,9 +269,9 @@
<field name="VAR" id="E%bpr=oJ$[~BqmwXff10">num</field>
<value name="VALUE">
<block type="import_function_return" id="40?cictl}DWc3!R,D-9M">
<mutation parentId="fg*@P2^]({h$/bje{3ek"/>
<mutation parentId="fg*@P2^]({h$/bje{3ek" parentFilename="lib/machine_learning.py"/>
<field name="name">MakePictureRunKiReturnFoundPart</field>
<data>fg*@P2^]({h$/bje{3ek</data>
<data>{"id":"fg*@P2^]({h$/bje{3ek","filename":"lib/machine_learning.py"}</data>
</block>
</value>
<next>
......@@ -294,7 +294,7 @@
</value>
<statement name="DO0">
<block type="encodermotor_set_values" id=";0kCCgi4,xTbb}ac~J])">
<field name="instance_name_0">TXT_SLD_M_M2_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-)Eq*8C-!QYXfX/2!QXeH</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="oq`6vK!o~IK6]CTf-!}s">
......@@ -313,12 +313,12 @@
<block type="util_wait_until" id="f!q[S?SE9^w|_t+m?%L7">
<value name="value">
<block type="encodermotor_position_read" id="8fP$s{*f~;0,SID,cURx">
<field name="instance_name">TXT_SLD_M_M2_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-)Eq*8C-!QYXfX/2!QXeH</field>
</block>
</value>
<next>
<block type="encodermotor_set_values" id="scO1:Jv$w%Q%h[m.q(Ny">
<field name="instance_name_0">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="71e:tt]4zV)@KGqoR#Z^">
......@@ -340,7 +340,7 @@
<block type="util_wait_until" id="17PI`Ly9}%cj~+Us8ydE">
<value name="value">
<block type="encodermotor_position_read" id="d4XF`[+[~E=^7)@iGdk=">
<field name="instance_name">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
</block>
</value>
</block>
......@@ -375,7 +375,7 @@
</value>
<next>
<block type="encodermotor_set_values" id="M@2sYg,Em~3{Nn?JC}?K">
<field name="instance_name_0">TXT_SLD_M_M2_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-)Eq*8C-!QYXfX/2!QXeH</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="O.E6kQ)40ay7LL~8OF$_">
......@@ -394,12 +394,12 @@
<block type="util_wait_until" id="P:kB:[eWNKwnMSWDfFay">
<value name="value">
<block type="encodermotor_position_read" id=".MEE:#$JSGNQ^kR5Rcq4">
<field name="instance_name">TXT_SLD_M_M2_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-)Eq*8C-!QYXfX/2!QXeH</field>
</block>
</value>
<next>
<block type="encodermotor_set_values" id="(AN3:3^$5.f0pY/KkHgN">
<field name="instance_name_0">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="_`tT|(KcHkJpgsD}SKtt">
......@@ -421,7 +421,7 @@
<block type="util_wait_until" id="B-/fjR-%@b4A5#7Z:$Xj">
<value name="value">
<block type="encodermotor_position_read" id="4,T#+MzxH4f#BVtu}H0v">
<field name="instance_name">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
</block>
</value>
</block>
......@@ -446,7 +446,7 @@
<mutation name="moveRefM2"/>
<next>
<block type="encodermotor_set_values" id=".b~r%M!X`_~iPSqjydw#">
<field name="instance_name_0">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name_0">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
<field name="direction_0">Motor.CCW</field>
<value name="speed">
<shadow type="motor_number" id="4YHsYBCP~k-0^M{4(gl/">
......@@ -468,7 +468,7 @@
<block type="util_wait_until" id="v_[dP_(nQN%;{Jrp2!U3">
<value name="value">
<block type="encodermotor_position_read" id="VRKA:ye`md*#|04{b#MO">
<field name="instance_name">TXT_SLD_M_M1_encodermotor</field>
<field name="instance_name">[v6x3J=Tm+dMJAsQlQOi-ueH%w!w?!F?z}pP!QiP7</field>
</block>
</value>
</block>
......
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