Thaddeus LeowBryant Lewwang xu linLok Qi JIAN
Published

EGXP project (Enhanced Conveyor Belt System)

Smart retail, inventory tracking, management and monitoring

BeginnerWork in progress174
EGXP project (Enhanced Conveyor Belt System)

Story

Read more

Schematics

Pictures of prototype

Pictures of prototype

Pictures of prototype

Pictures of prototype

Block diagram

Block diagram

Block diagram

Flowchart1

flowchart2

flow chart 3

Code

RFID, ENV3 and TOF project (finalised 3.0 prototype may not work).m5f

Python
{"components":[{"id":"____screen","createTime":1633849548889,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#222222","backgroundImage":"","type":"screen"},{"id":"____buttonA","createTime":1633849548889,"name":"ButtonA","buttonIndex":0,"x":35,"y":216,"width":64,"height":24,"text":"ButtonA","visibility":false,"type":"button"},{"id":"____buttonB","createTime":1633849548889,"name":"ButtonB","buttonIndex":1,"x":125,"y":216,"width":64,"height":24,"text":"ButtonB","visibility":false,"type":"button"},{"id":"____buttonC","createTime":1633849548889,"name":"ButtonC","buttonIndex":2,"x":215,"y":216,"width":64,"height":24,"text":"ButtonC","visibility":false,"type":"button"},{"id":"r`=%c-3l-Omr&ykz","createTime":1633849805141,"isCoreTwo":false,"isPaper":false,"name":"label0","x":19,"y":30,"color":"#FFFFFF","text":"Text","font":"lcd.FONT_DejaVu18","rotation":0,"type":"label","layer":4},{"id":"jgCngXw$V1$^3^K8","createTime":1633849847123,"isCoreTwo":false,"isPaper":false,"name":"label1","x":19,"y":214,"color":"#FFFFFF","text":"Text","font":"lcd.FONT_DejaVu18","rotation":0,"type":"label","layer":5},{"id":"xG^CmI8cYV_7MNVK","createTime":1673692775757,"isCoreTwo":false,"isPaper":false,"name":"label2","x":19,"y":175,"color":"#FFFFFF","text":"Text","font":"lcd.FONT_DejaVu18","rotation":0,"type":"label","layer":16},{"id":"pO%LS#@QEAjoYUSI","createTime":1673694009930,"isCoreTwo":false,"isPaper":false,"name":"label3","x":122,"y":101,"color":"#21f022","text":"Text","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":17},{"id":"IRa-ga50ml4XMG+M","createTime":1673694016160,"isCoreTwo":false,"isPaper":false,"name":"label4","x":122,"y":151,"color":"#ff3838","text":"Text","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":18},{"id":"X-VSXUiRSdhBxR4S","createTime":1673694021261,"isCoreTwo":false,"isPaper":false,"name":"label5","x":122,"y":128,"color":"#404df4","text":"Text","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":19},{"id":"fe-E_PgNZ64@unVb","createTime":1673694270080,"isCoreTwo":false,"isPaper":false,"name":"label7","x":5,"y":151,"color":"#fc3939","text":"Temperature:","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":21},{"id":"m4@+GHM7-mk0$dN5","createTime":1673694291010,"isCoreTwo":false,"isPaper":false,"name":"label8","x":5,"y":128,"color":"#4370ff","text":"Humidity: ","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":22},{"id":"yt&J=wk^C^#-jYJL","createTime":1674705785293,"isCoreTwo":false,"isCoreInk":false,"isPaper":false,"name":"image0","x":220,"y":85,"imagePath":"default.jpg","visibility":true,"imageInvert":false,"imageThreshold":128,"type":"image","layer":20},{"id":"_2u#0`+jRM-VhtjJ","createTime":1673694243098,"isCoreTwo":false,"isPaper":false,"name":"label9","x":4,"y":101,"color":"#2bff00","text":"Pressure :","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":21},{"id":"+fIq@7FV*e-MgB+q","createTime":1674707155700,"isCoreTwo":false,"isPaper":false,"name":"label6","x":12,"y":70,"color":"#f1eb0f","text":"Text","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":23}],"type":"core","versions":"Beta","units":[{"id":"#b36kitUS2iV0ONF","createTime":1675136484692,"type":"rfid","name":"rfid_0","port":"PAHUB","default":["A","E","PAHUB","Custom"],"pb_port":[0,1,2,3,4,5],"new_pb_port":"0","user_port":["21","22"],"icon":"rfid.png"},{"id":"7KG2%+3wbovDXAsB","createTime":1675136484692,"type":"pahub","name":"pahub_0","port":"A","default":["A","E","Custom"],"user_port":["21","22"],"icon":"pa_hub.png"},{"id":"3XpaUX`_Rt$=_MCp","createTime":1675136484692,"stickNone":"stick","type":"tof","name":"tof_0","port":"PAHUB","default":["A","E","PAHUB","Custom"],"pb_port":[0,1,2,3,4,5],"new_pb_port":"5","user_port":["21","22"],"icon":"tof.png"},{"id":"M$4PR_*c^-ZMu!YO","createTime":1675136484692,"hidden":false,"type":"env3","name":"env3_0","port":"PAHUB","default":["A","E","PAHUB","Custom"],"pb_port":[0,1,2,3,4,5],"new_pb_port":"1","user_port":["21","22"],"icon":"env3.png"}],"hats":[],"blockly":"<variables><variable id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</variable></variables><block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"121\" y=\"117\"><next><block type=\"basic_on_loop\" id=\"o`NCd@@OWo7TBn`;`Vxq\"><statement name=\"LOOP\"><block type=\"controls_if\" id=\"tT2{^.z5/x@xDqCB_XSA\"><mutation elseif=\"1\" else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_compare\" id=\"$yk5=}`{[9Mt+yrmPbQz\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"dht12_get_temperature\" id=\"G^?~WfzjCXOWoos@:;1h\"><field name=\"VARNAME\">env3_0</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"*KL#3s];81Hz)|V/Dl_c\"><field name=\"NUM\">30</field></block></value></block></value><statement name=\"DO0\"><block type=\"image_set_image\" id=\"KG$3]mBO_qj[$eXCh8pA\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"_/1S!y90.lWKcbv-np[7\"><field name=\"COMPONENT\">label6</field><value name=\"TEXT\"><shadow type=\"text\" id=\"+5wOhsF2pM|sVVe}?tdn\"><field name=\"TEXT\">Temperature too high</field></shadow></value></block></next></block></statement><value name=\"IF1\"><block type=\"logic_compare\" id=\"pmsuDbsDC(zz)A8eLQ]0\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"dht12_get_temperature\" id=\"QxU!7_3s`A#E=#V+5#[E\"><field name=\"VARNAME\">env3_0</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"^%aPK9x~A(u1TH^]4)e;\"><field name=\"NUM\">15</field></block></value></block></value><statement name=\"DO1\"><block type=\"image_set_image\" id=\"o%H*rX)G42]Ek1A/aWji\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"%]w~;RIi+]8F3kN-y/z#\"><field name=\"COMPONENT\">label6</field><value name=\"TEXT\"><shadow type=\"text\" id=\"vL,TJH(LL@h6I92LF@U/\"><field name=\"TEXT\">Temperature too low</field></shadow></value></block></next></block></statement><statement name=\"ELSE\"><block type=\"image_set_image\" id=\"L(V`6:AGcFWiOjn^9}md\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"_BHi603gNY}eGtNUK0F_\"><field name=\"COMPONENT\">label6</field><value name=\"TEXT\"><shadow type=\"text\" id=\"i{28iA4Gj#}iW;?2$T7V\"><field name=\"TEXT\">Acceptable temperature</field></shadow></value></block></next></block></statement><next><block type=\"label_set_text\" id=\"MLhs({PHB;q:bHqTjnqr\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"yxSpL~7^LP!pDpYLO.rN\"><field name=\"TEXT\">No object detected</field></shadow></value><next><block type=\"variables_set\" id=\"egyupB4/xXhT%x]lb#|,\"><field name=\"VAR\" id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</field><value name=\"VALUE\"><block type=\"convent_int\" id=\"G|U~ezLvmc-n{Ok59nVm\"><value name=\"VALUE\"><block type=\"math_arithmetic\" id=\"Py-*gz%4TZpPfwp!G8V;\"><field name=\"OP\">DIVIDE</field><value name=\"A\"><block type=\"unit_tof_state\" id=\"vh-Nb(z.?^gMPf/BeplN\"><field name=\"TOF\">tof_0</field></block></value><value name=\"B\"><block type=\"math_number\" id=\")2G)g0Rd6q|@~[*r~d|?\"><field name=\"NUM\">10</field></block></value></block></value></block></value><next><block type=\"label_set_text\" id=\"?w6W|rYYaSzot+4#U/Yc\"><field name=\"COMPONENT\">label2</field><value name=\"TEXT\"><shadow type=\"text\" id=\";?J@2Ac]|4;6vU/wYUbg\"><field name=\"TEXT\">Rejected products detected</field></shadow><block type=\"variables_get\" id=\"J9plv,7Dk-H+Fgptl^=c\"><field name=\"VAR\" id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</field></block></value><next><block type=\"label_set_text\" id=\"evm`+D6}o+4u`)KQu0cZ\"><field name=\"COMPONENT\">label3</field><value name=\"TEXT\"><shadow type=\"text\"><field name=\"TEXT\">Rejected products detected</field></shadow><block type=\"dht12_pressure\" id=\":zt;n48csw4RaVrP-[;D\"><field name=\"VARNAME\">env3_0</field></block></value><next><block type=\"label_set_text\" id=\"By)6~rZu:mBmSX=PNEI8\"><field name=\"COMPONENT\">label4</field><value name=\"TEXT\"><shadow type=\"text\" id=\"Pszv*CvC0d{}.FxR_%-@\"><field name=\"TEXT\">Rejected products detected</field></shadow><block type=\"dht12_get_temperature\" id=\"LlFYbo_;I8(kU;=ekvEH\"><field name=\"VARNAME\">env3_0</field></block></value><next><block type=\"label_set_text\" id=\"kg%eu*Mw`hj7RxR%%@;{\"><field name=\"COMPONENT\">label5</field><value name=\"TEXT\"><shadow type=\"text\" id=\"Iq6weuh%UTtsvjB_K2W3\"><field name=\"TEXT\">Rejected products detected</field></shadow><block type=\"dht12_get_humidity\" id=\"/Q3F@8Wm~Vt%@-[Bj1WV\"><field name=\"VARNAME\">env3_0</field></block></value><next><block type=\"controls_if\" id=\"Ek0cvJX6:y##@5w+r]p6\"><mutation elseif=\"2\" else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_compare\" id=\"%4o,9E2+H4]iTl{+tKlF\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"variables_get\" id=\"p!am(}1TF5{ja{ViOgw[\"><field name=\"VAR\" id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"dyZ!jq9SX6oc|ySRMO__\"><field name=\"NUM\">50</field></block></value></block></value><statement name=\"DO0\"><block type=\"rgb_set_all\" id=\";0#XTS:AO@@xu#+8D[16\"><field name=\"COLOR\">#ff0000</field><next><block type=\"label_set_text\" id=\"rXLCvo5q;Je!z`a1Xhu+\"><field name=\"COMPONENT\">label1</field><value name=\"TEXT\"><shadow type=\"text\" id=\"4x5DRnE=G+aZ^}2])4r:\"><field name=\"TEXT\">Low supply</field></shadow></value></block></next></block></statement><value name=\"IF1\"><block type=\"logic_operation\" id=\"fg85p~NY`;Fxtad`3*Mt\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"logic_compare\" id=\"y[Zr,}1/3^irukAOGjNn\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"variables_get\" id=\"cr-tdN49R^Oqf5*l{=|}\"><field name=\"VAR\" id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"$u%hO{|Y|5*5D(~RlGmb\"><field name=\"NUM\">20</field></block></value></block></value><value name=\"B\"><block type=\"logic_compare\" id=\"e5NA9_Q*?tae%~A2s[MU\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"variables_get\" id=\"Cz~YxTlc(4jnD7:L`N{u\"><field name=\"VAR\" id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"($GfbU$4hBxn/Q/,`h`4\"><field name=\"NUM\">50</field></block></value></block></value></block></value><statement name=\"DO1\"><block type=\"label_set_text\" id=\"$Ew3qoQdZYI?QN:=zNv+\"><field name=\"COMPONENT\">label1</field><value name=\"TEXT\"><shadow type=\"text\" id=\"HPGR%B{/%zte2~O#aCxX\"><field name=\"TEXT\">Medium amount</field></shadow></value><next><block type=\"rgb_set_all\" id=\"F55]bRSzEmmgAYWva4Oy\"><field name=\"COLOR\">#ffcc00</field></block></next></block></statement><value name=\"IF2\"><block type=\"logic_compare\" id=\"h]h%b|6ce7hF|}@p6RKj\"><field name=\"OP\">LTE</field><value name=\"A\"><block type=\"variables_get\" id=\"lyeUpi$k{%k8Q/c9AF75\"><field name=\"VAR\" id=\"/zt@VdJ9#Ei?S[lHFhvo\">object</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"+a)~$*P-5x9FLTLPOd0w\"><field name=\"NUM\">20</field></block></value></block></value><statement name=\"DO2\"><block type=\"rgb_set_all\" id=\";]ExGz3XUp%!/ah~x7y/\"><field name=\"COLOR\">#33ff33</field><next><block type=\"label_set_text\" id=\"Tt[`Gmtf{u5DLj7|qe*,\"><field name=\"COMPONENT\">label1</field><value name=\"TEXT\"><shadow type=\"text\" id=\"]5WN0|JSe~wi!qGzZh_d\"><field name=\"TEXT\">Healthy amount of supply</field></shadow></value></block></next></block></statement><statement name=\"ELSE\"><block type=\"rgb_set_all\" id=\"c`yUogbKMhjP/A/iE9~p\"><field name=\"COLOR\">#000000</field></block></statement><next><block type=\"controls_if\" id=\"QLn;f(6MhdJ(}=[|$^~v\"><value name=\"IF0\"><block type=\"rfid_cardOn\" id=\"eyz{T@jGGl8CSvC;fu?|\"><field name=\"RFID\">rfid_0</field></block></value><statement name=\"DO0\"><block type=\"controls_if\" id=\"G6/=|MTN#xg$2;+.*u-9\"><mutation elseif=\"1\" else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_compare\" id=\"2+:wg$YK,$O^x~vahtj`\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"rfid_uid\" id=\"pCc7FxthO%/n40sJKy-Q\"><field name=\"RFID\">rfid_0</field></block></value><value name=\"B\"><block type=\"text\" id=\"Q(-M2(K?%d,4NSD-bpd_\"><field name=\"TEXT\">a2d86212a</field></block></value></block></value><statement name=\"DO0\"><block type=\"label_set_mode\" id=\"Nt1rO=Yedf|i:(:m8z)7\"><field name=\"COMPONENT\">label0</field><field name=\"MODE\">False</field><next><block type=\"label_set_text\" id=\"/o4WuCV-tsOQh|OT!fv}\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"9V(8`p/X0|}a6PZdYe-^\"><field name=\"TEXT\">Rejected products detected</field></shadow></value><next><block type=\"speaker_tone\" id=\"M8mcU[-f:9ttg,x#TER3\"><value name=\"FREQ\"><shadow type=\"math_number\" id=\"X4q_XjjS5(LmLmt;cuv#\"><field name=\"NUM\">1800</field></shadow></value><value name=\"TIMEOUT\"><shadow type=\"math_number\" id=\"$:By;J3*:^IX]86tyQ4@\"><field name=\"NUM\">500</field></shadow></value><next><block type=\"timer_delay\" id=\"{@]!5+3{Shz#0}U+Ybr6\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"r)|3{eWn[@o^/=M!4x.x\"><field name=\"NUM\">0.25</field></shadow></value></block></next></block></next></block></next></block></statement><value name=\"IF1\"><block type=\"logic_compare\" id=\"w/;B5.`QI|n+Y4XWK^c3\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"rfid_uid\" id=\"$uC0ExV0PL)RUoj?FSM@\"><field name=\"RFID\">rfid_0</field></block></value><value name=\"B\"><block type=\"text\" id=\"@7Am;~}1@W_P!Ws0%;hd\"><field name=\"TEXT\">a7a888ec6b</field></block></value></block></value><statement name=\"DO1\"><block type=\"label_set_mode\" id=\"Yst~qP7vvAuKmZUJ)~wq\"><field name=\"COMPONENT\">label0</field><field name=\"MODE\">False</field><next><block type=\"label_set_text\" id=\"oh*%$2B]HZuzgtd3FK3Z\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"ojD2a[DF#F^BF*Gy.`/K\"><field name=\"TEXT\">Product accepted</field></shadow></value><next><block type=\"speaker_tone\" id=\"JEFCN1,:Rx(6^nvd7dL9\"><value name=\"FREQ\"><shadow type=\"math_number\" id=\"59dai0C?_;]e!=gi7Z~R\"><field name=\"NUM\">1000</field></shadow></value><value name=\"TIMEOUT\"><shadow type=\"math_number\" id=\"Qp?tWR,Q-05y{obp#o8J\"><field name=\"NUM\">200</field></shadow></value><next><block type=\"timer_delay\" id=\"LO*%M;dv)~}voYyZ+;1^\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"u;8gJ]OS~va(#li+:]S:\"><field name=\"NUM\">0.25</field></shadow></value></block></next></block></next></block></next></block></statement><statement name=\"ELSE\"><block type=\"label_set_mode\" id=\"*O71tkXi(TDd2DoOc7Ih\"><field name=\"COMPONENT\">label0</field><field name=\"MODE\">False</field><next><block type=\"label_set_text\" id=\"1n?j3dQ_dML?60.vVXI3\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"ST~0?(^NrC@I4]Xf5GJ+\"><field name=\"TEXT\">Product not tested</field></shadow></value><next><block type=\"speaker_tone\" id=\"Hfc2@4/{).fk98#ky5h=\"><value name=\"FREQ\"><shadow type=\"math_number\" id=\"p*~p+N87bZ%n4wyQke;L\"><field name=\"NUM\">2000</field></shadow></value><value name=\"TIMEOUT\"><shadow type=\"math_number\" id=\"A@jq0(giSD}`qv2d346!\"><field name=\"NUM\">500</field></shadow></value><next><block type=\"timer_delay\" id=\"#t3cyPMwzVCg+jYuhKwh\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"4[vh:t4ie*;X6[.L`k3o\"><field name=\"NUM\">0.25</field></shadow></value></block></next></block></next></block></next></block></statement></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block><block type=\"controls_if\" id=\"WA;fM1MR+DqT/ua|DdGn\" disabled=\"true\" x=\"670\" y=\"1750\"><next><block type=\"controls_if\" id=\"T?#Sn:.i!WaSt8bFLWO3\" disabled=\"true\"><value name=\"IF0\"><block type=\"logic_compare\" id=\"_+Nd+J]rc1FXq1]!7(eu\" disabled=\"true\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"rfid_uid\" id=\"NXW/Y5@j.%|}i$RC|ctV\" disabled=\"true\"><field name=\"RFID\">rfid_0</field></block></value><value name=\"B\"><block type=\"text\" id=\"@ud``KYKA9s*JfTMw%UL\" disabled=\"true\"><field name=\"TEXT\">b72a61ec10</field></block></value></block></value></block></next></block>","Blockly.Remotes":[],"Blockly.RemotePlus":[{"id":"__title","blockId":"","createTime":1675136484692,"name":"M5Remote","dragAndDrop":false,"resizable":false,"options":{"minWidth":1,"minHeight":1,"maxWidth":6,"maxHeight":10,"defaultWidth":2,"defaultHeight":1},"w":2,"h":1,"bgColor":"#0080FF","color":"#fff","fontsize":"M","label":"M5Remote","interval":3000,"code":"","event":"","dataSource":"none","ezdataToken":"","topic":"","needShadow":false,"type":"title","x":0,"y":0}],"modules":["rgb"],"cbIdList_":[],"eventCBIdList_":[]}

Motor and detector(completed 2.0).m5f

Python
{"components":[{"id":"____screen","createTime":1674698681795,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#222222","backgroundImage":"","type":"screen"},{"id":"____buttonA","createTime":1674698681796,"name":"ButtonA","buttonIndex":0,"x":35,"y":216,"width":64,"height":24,"text":"ButtonA","visibility":false,"type":"button"},{"id":"____buttonB","createTime":1674698681796,"name":"ButtonB","buttonIndex":1,"x":125,"y":216,"width":64,"height":24,"text":"ButtonB","visibility":false,"type":"button"},{"id":"____buttonC","createTime":1674698681796,"name":"ButtonC","buttonIndex":2,"x":215,"y":216,"width":64,"height":24,"text":"ButtonC","visibility":false,"type":"button"},{"id":"ibhh+deiZUFc#JtB","createTime":1674700230888,"isCoreTwo":false,"isPaper":false,"name":"label0","x":103,"y":92,"color":"#ff0000","text":"Text","font":"lcd.FONT_DejaVu24","rotation":0,"type":"label","layer":7}],"type":"core","versions":"Beta","units":[{"id":"QZEMaU+34e&C6Sxd","createTime":1675318106616,"type":"servo","name":"servo_0","port":"A","default":["A","B","C","E","Custom"],"user_port":["21","22"],"icon":"servo.png"},{"id":"5v#mz*L68wxdwq_P","createTime":1675318106616,"type":"pir","name":"pir_0","port":"B","default":["A","B","C","E","Custom"],"user_port":["21","22"],"icon":"pir.png"}],"hats":[],"blockly":"<variables><variable id=\"Ent60zM~-=iUafQ%$@e+\">unusual</variable><variable id=\"aYBjgId)W4Bnl^Ar5i0/\">pIR</variable></variables><block type=\"button_callback\" id=\"!RUUY|HT[GAFv!QUVqda\" x=\"510\" y=\"-50\"><field name=\"BUTTON\">A</field><field name=\"EVENT\">wasPressed</field><statement name=\"FUNC\"><block type=\"servo_unit_write_angle\" id=\"1776o[1uMYH*^w+2RYnq\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"KP3SDR=0K1$jCIL5or*g\"><field name=\"NUM\">180</field></shadow></value><next><block type=\"timer_delay\" id=\"})Y^K7{Dk3D-4,eweFhp\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"lKa,=ef;Ru3]4@}uu~vZ\"><field name=\"NUM\">3</field></shadow></value><next><block type=\"servo_unit_write_angle\" id=\"J,C;ti;^pV?nKZ=YB)IW\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"*1y4i11KbU?OBS2_HXzf\"><field name=\"NUM\">0</field></shadow></value></block></next></block></next></block></statement></block><block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"129\" y=\"97\"><next><block type=\"basic_on_loop\" id=\"ur6@cuG7+a(9-tX`{Pr@\"><statement name=\"LOOP\"><block type=\"variables_set\" id=\"kjQoE_%^`~iD{5rf(t((\"><field name=\"VAR\" id=\"Ent60zM~-=iUafQ%$@e+\">unusual</field><value name=\"VALUE\"><block type=\"math_number\" id=\"(-.qk_7!ZbF39eF_@9`!\"><field name=\"NUM\">0</field></block></value><next><block type=\"variables_set\" id=\"vMO9OGry)k`*ynTIl.^T\"><field name=\"VAR\" id=\"aYBjgId)W4Bnl^Ar5i0/\">pIR</field><value name=\"VALUE\"><block type=\"pir_read\" id=\",b!xr65WOhhZoX*vrCD]\"><field name=\"VARNAME\">pir_0</field></block></value><next><block type=\"controls_if\" id=\"ZbZ2uVOw*aa-y/rgPPR$\"><mutation else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_compare\" id=\"hePDlT--(Pd7Z4E!44E6\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"variables_get\" id=\"Im%NP.%FOc)s;oeL4o+K\"><field name=\"VAR\" id=\"aYBjgId)W4Bnl^Ar5i0/\">pIR</field></block></value><value name=\"B\"><block type=\"variables_get\" id=\";e#nDlaJuia3=KZ2W|{G\"><field name=\"VAR\" id=\"Ent60zM~-=iUafQ%$@e+\">unusual</field></block></value></block></value><statement name=\"DO0\"><block type=\"speaker_tone\" id=\"R{(zW=If[7,YO]~xT2~T\"><value name=\"FREQ\"><shadow type=\"math_number\" id=\"=/bGwYJ+MMOiccQo{4*o\"><field name=\"NUM\">1800</field></shadow></value><value name=\"TIMEOUT\"><shadow type=\"math_number\" id=\"9D2e-:-q[P:R$9WTWMG;\"><field name=\"NUM\">200</field></shadow></value><next><block type=\"speaker_vol\" id=\"T^8;cT$t37_35%-/:s^|\"><value name=\"VOLUME\"><shadow type=\"math_number\" id=\":hX$qMl]xi/DwyU4kG?o\"><field name=\"NUM\">1</field></shadow></value><next><block type=\"label_set_text\" id=\"}SQTtyoJY[J{gz%m)3z|\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"{{:,4{j)4wq)Diia.ujB\"><field name=\"TEXT\">conveyor issue</field></shadow></value></block></next></block></next></block></statement><statement name=\"ELSE\"><block type=\"label_set_text\" id=\"{kzo]Aar3!WIIK|lSiFF\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\".@_q:gR$Iw[e7wN%Ptg{\"><field name=\"TEXT\">Normal</field></shadow></value></block></statement><next><block type=\"timer_delay\" id=\"0Cp;Jhd8Isb~Y*[4]oXQ\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"A;Ju7d-!qUx_t1@1WDk$\"><field name=\"NUM\">3</field></shadow></value></block></next></block></next></block></next></block></statement></block></next></block><block type=\"button_callback\" id=\"JO;hZq!jx)jk9r%39Cw1\" x=\"510\" y=\"110\"><field name=\"BUTTON\">B</field><field name=\"EVENT\">wasPressed</field><statement name=\"FUNC\"><block type=\"servo_unit_write_angle\" id=\"(%fnh;G;5ueX!@JNXcGP\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\".n-19Bpd._c*5Y)4QdLu\"><field name=\"NUM\">180</field></shadow></value></block></statement></block><block type=\"button_callback\" id=\"(!MIingHmVABkZLvlf`m\" x=\"510\" y=\"190\"><field name=\"BUTTON\">C</field><field name=\"EVENT\">wasPressed</field><statement name=\"FUNC\"><block type=\"servo_unit_write_angle\" id=\"A/T{r7Je4,`=xs#T3FrO\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"~K$PFvjgsdjgy)L%QPJ?\"><field name=\"NUM\">0</field></shadow></value></block></statement></block>","Blockly.Remotes":[],"Blockly.RemotePlus":[{"id":"__title","blockId":"","createTime":1675318106616,"name":"M5RemoteTitle","dragAndDrop":false,"resizable":false,"options":{"minWidth":1,"minHeight":1,"maxWidth":6,"maxHeight":10,"defaultWidth":2,"defaultHeight":1},"w":2,"h":1,"bgColor":"#0080FF","color":"#fff","fontsize":"M","label":"M5Remote","interval":3000,"code":"","event":"","dataSource":"none","ezdataToken":"","topic":"","needShadow":false,"type":"title","x":0,"y":0}],"modules":["rgb"],"cbIdList_":[],"eventCBIdList_":[]}

Credits

Thaddeus Leow
1 project • 1 follower
Bryant Lew
1 project • 0 followers
wang xu lin
1 project • 0 followers
Lok Qi JIAN
1 project • 0 followers

Comments