-
Notifications
You must be signed in to change notification settings - Fork 3
/
pub-sub-motion.m5f
1 lines (1 loc) · 8.48 KB
/
pub-sub-motion.m5f
1
{"components":[{"id":"____screen","createTime":1627288186791,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#222222","backgroundImage":"","type":"screen"}],"type":"atom-matrix","versions":"Beta","units":[],"hats":[],"blockly":"<block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"50\" y=\"50\"><next><block type=\"mqtt_set_client\" id=\"QBa#4I}~r!@6Fw)ZWKy{\"><value name=\"ID\"><shadow type=\"text\" id=\"Y%$|n]eEa]L9M{isjKDy\"><field name=\"TEXT\">atom-lite</field></shadow></value><value name=\"SERVER\"><shadow type=\"text\" id=\"?IV92CT,gH(jXn8yM=HV\"><field name=\"TEXT\">cloud.tbz.ch</field></shadow></value><value name=\"PORT\"><shadow type=\"math_number\" id=\"*OWy7bfmJgVc.nD7?e]E\"><field name=\"NUM\">1883</field></shadow></value><value name=\"USER\"><shadow type=\"text\" id=\"Ho=Vk/Yv|BNvB_q5;69F\"><field name=\"TEXT\">test</field></shadow></value><value name=\"PASSWORD\"><shadow type=\"text\" id=\"O^y1LcdwAC.-bj;rMClV\"><field name=\"TEXT\">test</field></shadow></value><value name=\"KEEPALIVE\"><shadow type=\"math_slider\" id=\"Z#,40,;DQz]m3G}Ecf:;\"><field name=\"NUM\" max=\"65536\" step=\"1\">300</field></shadow></value><next><block type=\"mqtt_start\" id=\"o@*yZ0r(fVyOO@Q9Pd5a\"><next><block type=\"motion_init\" id=\"g5v8CRq=(0$cy:D,dKN(\"><next><block type=\"rgb_set_all_rgb\" id=\"+cB1.XgJ^RxUobV6Rz06\"><value name=\"R\"><shadow type=\"math_slider\" id=\"IBP:Tpvl:j.aupq`;EW1\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><value name=\"G\"><shadow type=\"math_slider\" id=\"|R+2Iqq=dj/{yCb=2.c5\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><value name=\"B\"><shadow type=\"math_slider\" id=\"[hf5L1?39u+h:V^N$#cJ\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><next><block type=\"motion_set_servo_angle\" id=\"uNS~~)mSIU=Ux(]7%b@o\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"%nhBlp2Dr^n!WDXXXiF.\"><field name=\"NUM\" min=\"1\" max=\"4\" step=\"1\">1</field></shadow></value><value name=\"angle\"><shadow type=\"math_slider\" id=\".9%Np~y~?}`er{BF#]aa\"><field name=\"NUM\" max=\"180\" step=\"1\">90</field></shadow></value><next><block type=\"motion_set_motor_speed\" id=\"O-EBbWq0D:Z7tgcq:%$t\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"8jncI,#MC+iaNGj.c@{^\"><field name=\"NUM\" min=\"1\" max=\"2\" step=\"1\">2</field></shadow></value><value name=\"speed\"><shadow type=\"math_slider\" id=\"3K|O|#7ds02)cpzIWA2q\"><field name=\"NUM\" min=\"-127\" max=\"127\" step=\"1\">0</field></shadow></value></block></next></block></next></block></next></block></next></block></next></block></next></block><block type=\"mqtt_sub\" id=\"@=R;`t2AoAvEbyw=Rr)#\" x=\"510\" y=\"90\"><value name=\"FROM\"><shadow type=\"text\" id=\"cVQU3+_oc5HwsH_ExCtw\"><field name=\"TEXT\">m5stack/lite</field></shadow></value><statement name=\"FUNC\"><block type=\"logic_switch\" id=\"v,nUoBI^(nU[akf#}FK0\"><mutation items=\"4\"></mutation><value name=\"SWITCH\"><block type=\"mqtt_get_topic_data\" id=\"|7)7|).8lBFckRcOR-^F\"></block></value><value name=\"CASE0\"><block type=\"text\" id=\"S9^S@2yV|T%HB9-^g!AE\"><field name=\"TEXT\">open</field></block></value><statement name=\"DO0\"><block type=\"motion_set_servo_angle\" id=\"tfbw+OYB;#$lnWrkadJb\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"N_+ZwA_{IUGTlSeLhU#^\"><field name=\"NUM\" min=\"1\" max=\"4\" step=\"1\">1</field></shadow></value><value name=\"angle\"><shadow type=\"math_slider\" id=\"a5,`.eGMc1!t`g!?LbfR\"><field name=\"NUM\" max=\"180\" step=\"1\">160</field></shadow></value><next><block type=\"rgb_set_all_rgb\" id=\"_eKk]u*.Ne_Bq-Ie^mc~\"><value name=\"R\"><shadow type=\"math_slider\" id=\"*p5sfR(T7:2xwqEX^Fo$\"><field name=\"NUM\" max=\"255\" step=\"1\">0</field></shadow></value><value name=\"G\"><shadow type=\"math_slider\" id=\"4IjF~It$yywltaCEh=E5\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><value name=\"B\"><shadow type=\"math_slider\" id=\"/bY;/*dW+7B?IDb,n:~C\"><field name=\"NUM\" max=\"255\" step=\"1\">0</field></shadow></value></block></next></block></statement><value name=\"CASE1\"><block type=\"text\" id=\"H!-(T3a?xqYnzH7Hu2Z$\"><field name=\"TEXT\">close</field></block></value><statement name=\"DO1\"><block type=\"motion_set_servo_angle\" id=\"w#E8Y@K1e5aTtGwKE__X\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"Dr+LnMZO*F5ExE!?K!^F\"><field name=\"NUM\" min=\"1\" max=\"4\" step=\"1\">1</field></shadow></value><value name=\"angle\"><shadow type=\"math_slider\" id=\"OniF-B6)=]/1Eeg-XQfl\"><field name=\"NUM\" max=\"180\" step=\"1\">20</field></shadow></value><next><block type=\"rgb_set_all_rgb\" id=\"!zo_oj)M-(~+[7sN^+F-\"><value name=\"R\"><shadow type=\"math_slider\" id=\"Gpee6!px)SlrSPhF=H6@\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><value name=\"G\"><shadow type=\"math_slider\" id=\"TX*2[a{$QJ^5y)[1l~#?\"><field name=\"NUM\" max=\"255\" step=\"1\">0</field></shadow></value><value name=\"B\"><shadow type=\"math_slider\" id=\"`Ps+lfVhu6@lN7~fN+H)\"><field name=\"NUM\" max=\"255\" step=\"1\">0</field></shadow></value></block></next></block></statement><value name=\"CASE2\"><block type=\"text\" id=\"Pl7{;~Ua3#.qJjBH^5Jy\"><field name=\"TEXT\">forward</field></block></value><statement name=\"DO2\"><block type=\"motion_set_motor_speed\" id=\"CYeW(8cdahv:xxIQOaVK\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"[lV$i/lbp+.i~@D@e];w\"><field name=\"NUM\" min=\"1\" max=\"2\" step=\"1\">2</field></shadow></value><value name=\"speed\"><shadow type=\"math_slider\" id=\"o|[kt`AKd0Lc47VU9]]k\"><field name=\"NUM\" min=\"-127\" max=\"127\" step=\"1\">127</field></shadow></value></block></statement><value name=\"CASE3\"><block type=\"text\" id=\"eF?cpui{F3d@u9)KSB!M\"><field name=\"TEXT\">reverse</field></block></value><statement name=\"DO3\"><block type=\"motion_set_motor_speed\" id=\"un@/AJoI-RIi-:7lm|[!\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"$s^2GLeoVlMbPW?/BM3y\"><field name=\"NUM\" min=\"1\" max=\"2\" step=\"1\">2</field></shadow></value><value name=\"speed\"><shadow type=\"math_slider\" id=\"ncp.{8mr}v`h)YvwOU-{\"><field name=\"NUM\" min=\"-127\" max=\"127\" step=\"1\">-127</field></shadow></value></block></statement><value name=\"CASE4\"><block type=\"text\" id=\"T29N%DD%%+Y=u$K]H6bF\"><field name=\"TEXT\">stop</field></block></value><statement name=\"DO4\"><block type=\"motion_set_motor_speed\" id=\"Txy_od9aahvyF~3d7Zd!\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"#f5Z*{Twp,!(As+~88)_\"><field name=\"NUM\" min=\"1\" max=\"2\" step=\"1\">2</field></shadow></value><value name=\"speed\"><shadow type=\"math_slider\" id=\"4hcE{*s-TpM$8-1dRs*6\"><field name=\"NUM\" min=\"-127\" max=\"127\" step=\"1\">0</field></shadow></value></block></statement><statement name=\"DEFAULT\"><block type=\"motion_set_servo_angle\" id=\"^4-[=TqGv)I}#i]HD%]}\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"gWF@(7RQ1/#A;[Rf..3k\"><field name=\"NUM\" min=\"1\" max=\"4\" step=\"1\">1</field></shadow></value><value name=\"angle\"><shadow type=\"math_slider\" id=\"#10y#0bp4tm]I!P0?inC\"><field name=\"NUM\" max=\"180\" step=\"1\">90</field></shadow></value><next><block type=\"rgb_set_all_rgb\" id=\"GRU!Mm5H?|~u}-qt6`GU\"><value name=\"R\"><shadow type=\"math_slider\" id=\")*~QvptY0-ABqfRfkcED\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><value name=\"G\"><shadow type=\"math_slider\" id=\"NNZ:+@6_nTsr#*p1i8AY\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><value name=\"B\"><shadow type=\"math_slider\" id=\"9Jw4)+(Zjg^A;4Y8M}Vg\"><field name=\"NUM\" max=\"255\" step=\"1\">255</field></shadow></value><next><block type=\"motion_set_motor_speed\" id=\"i,a(ok1ASTBs~W-1urs6\"><value name=\"ch\"><shadow type=\"math_slider\" id=\"~#gM(F(]i?vH~JY96^sU\"><field name=\"NUM\" min=\"1\" max=\"2\" step=\"1\">2</field></shadow></value><value name=\"speed\"><shadow type=\"math_slider\" id=\"rZ?iiJDEJ)S#C6HN{Y@p\"><field name=\"NUM\" min=\"-127\" max=\"127\" step=\"1\">0</field></shadow></value></block></next></block></next></block></statement></block></statement></block>","Blockly.Remotes":[],"Blockly.RemotePlus":[{"createTime":1627288186791,"name":"M5Remote","dragAndDrop":false,"resizable":false,"color":"#fff","bgColor":"#0080FF","type":"title","id":"__title"}],"modules":["rgb"],"matrix":["#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111","#111111"]}