-
Notifications
You must be signed in to change notification settings - Fork 5
/
mqtt.m5f
1 lines (1 loc) · 8.45 KB
/
mqtt.m5f
1
{"components":[{"id":"____screen","createTime":1577993622667,"name":"Screen","x":0,"y":0,"width":120,"height":240,"backgroundColor":"#111111","backgroundImage":"","type":"screen"},{"id":"HrxvFh17!#dAM^i!","createTime":1577993890640,"name":"image0","x":0,"y":0,"imagePath":"humi3.jpg","visibility":true,"type":"image","layer":7}],"type":"stick-C","versions":"Beta","units":[],"hats":[],"blockly":"<variables><variable type=\"\" id=\"M;K]]n?0/h/oP-W2vw1F\">temperature</variable><variable type=\"\" id=\"+ZNwBYAH-!{CZ/oll`TV\">humidity</variable><variable type=\"\" id=\"ORGOs+73c1ceV/b]_#G+\">ticks</variable></variables><block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"70\" y=\"-150\"><next><block type=\"wifi_doConnect\" id=\"xAOH*auJU3gD+t}hH[2)\"><value name=\"apiKey\"><shadow type=\"text\" id=\"u#[sjna;2R)xlQA7E=F,\"><field name=\"TEXT\">YOUR_WIFI_SSID</field></shadow></value><value name=\"Msg\"><shadow type=\"text\" id=\"435@dhn0b3QLyC2T!x.q\"><field name=\"TEXT\">YOUR_WIFI_PASS</field></shadow></value><next><block type=\"mqtt_set_client\" id=\"~I(@;,E)H_:r%lrbEo-o\"><value name=\"ID\"><shadow type=\"text\" id=\"cMN:$Kl]+,D+%3mI88qC\"><field name=\"TEXT\">m5stick</field></shadow></value><value name=\"SERVER\"><shadow type=\"text\" id=\"L~M*.o*s1m|A-dv(m^Iq\"><field name=\"TEXT\">io.adafruit.com</field></shadow></value><value name=\"PORT\"><shadow type=\"math_number\" id=\"9%7j}^JX~FGL|T.h5vAP\"><field name=\"NUM\">1883</field></shadow></value><value name=\"USER\"><shadow type=\"text\" id=\"wC2Vn.C89RwN+)RlT{l;\"><field name=\"TEXT\">USER_NAME</field></shadow></value><value name=\"PASSWORD\"><shadow type=\"text\" id=\"sg/!;{%U*/gHYE_L9+9{\"><field name=\"TEXT\">YOUR_ACCESS_KEY</field></shadow></value><value name=\"KEEPALIVE\"><shadow type=\"math_number\" id=\"#Rozp(Ol-^1_G)if_~6u\"><field name=\"NUM\">300</field></shadow></value><next><block type=\"mqtt_start\" id=\"P[7X7J,Zb(Xq|dMU^oN4\"><next><block type=\"variables_set\" id=\"4c1e+brxo%#B06]~b-=W\"><field name=\"VAR\" id=\"M;K]]n?0/h/oP-W2vw1F\" variabletype=\"\">temperature</field><value name=\"VALUE\"><block type=\"text\" id=\"/90#%,TxEt!L*iy8j^G6\"><field name=\"TEXT\">---</field></block></value><next><block type=\"variables_set\" id=\"5)G.4gEVsNADbX|obRMw\"><field name=\"VAR\" id=\"+ZNwBYAH-!{CZ/oll`TV\" variabletype=\"\">humidity</field><value name=\"VALUE\"><block type=\"text\" id=\"knb1]un`HR4CVagm.4YA\"><field name=\"TEXT\">---</field></block></value><next><block type=\"variables_set\" id=\"c^lOQLvgJ?!$j7Dhk/uc\"><field name=\"VAR\" id=\"ORGOs+73c1ceV/b]_#G+\" variabletype=\"\">ticks</field><value name=\"VALUE\"><block type=\"math_number\" id=\"Wk*BBT!ycO*(N6:`kKyt\"><field name=\"NUM\">0</field></block></value><next><block type=\"axp_set_ldo2_voltage\" id=\"c^w9tDNf_GcD`NP{h)9.\"><value name=\"ANGLEX\"><shadow type=\"math_number\" id=\"t`rS$aJ(`*?NTG[;vjG[\"><field name=\"NUM\">2.8</field></shadow></value><next><block type=\"screen_set_bgcolor\" id=\"iIN}LQGlacnhaw#lR,ne\"><field name=\"COLOR\">#000000</field><next><block type=\"lcd_setFont\" id=\"Y|f)|9mbJb_K{mgl|5}H\"><field name=\"FONT_FAMILY\">FONT_DejaVu24</field><next><block type=\"timer_setStart\" id=\"1HTjgDL2]aR%Gvd{mgU~\"><field name=\"start_name\">timer1</field><field name=\"mode\">0x00</field><value name=\"period\"><shadow type=\"math_number\" id=\"|JcA$*K%N]sv!HA/RN]a\"><field name=\"NUM\">3500</field></shadow></value><next><block type=\"basic_on_loop\" id=\"z5sNh!n6KIwQ[k5QWZ_d\"><statement name=\"LOOP\"><block type=\"controls_ifelse\" id=\"O3/HqMtz]*)n}-8McMR?\"><value name=\"IF0\"><block type=\"math_number_property\" id=\"A}]f-]{FBT1OT2-j6r?{\"><mutation divisor_input=\"false\"></mutation><field name=\"PROPERTY\">EVEN</field><value name=\"NUMBER_TO_CHECK\"><block type=\"variables_get\" id=\"DAuY5$J8:N`osL6?(yUf\"><field name=\"VAR\" id=\"ORGOs+73c1ceV/b]_#G+\" variabletype=\"\">ticks</field></block></value></block></value><statement name=\"DO0\"><block type=\"lcd_fill\" id=\"[(Og8r2t2jOX}]+YHi=:\"><field name=\"COLOR\">#000000</field><next><block type=\"image_set_image\" id=\"`B/%7xqW%B%0DEgV8,f^\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">temp3.jpg</field><next><block type=\"image_set_position\" id=\"m31=0c$3FRUP^:AM|Qxq\"><field name=\"COMPONENT\">image0</field><value name=\"X\"><shadow type=\"math_number\" id=\"M]Jj4!YfDc6E~}SqV2l;\"><field name=\"NUM\">8</field></shadow></value><value name=\"Y\"><shadow type=\"math_number\" id=\"Qy?!idp%UJ_=x`!_Uh_{\"><field name=\"NUM\">8</field></shadow></value><next><block type=\"lcd_print\" id=\")K-8tCIine]:jLoUfy3,\"><field name=\"COLOR\">#ff6666</field><value name=\"TEXT\"><shadow type=\"text\" id=\".#BNZEMFw+qy-!^(uduL\"><field name=\"TEXT\">35.0</field></shadow><block type=\"variables_get\" id=\"5poa{.Da!,+mav?jO#+b\"><field name=\"VAR\" id=\"M;K]]n?0/h/oP-W2vw1F\" variabletype=\"\">temperature</field></block></value><value name=\"X\"><shadow type=\"math_number\" id=\")=;BHM[4c+Kkefs70?G/\"><field name=\"NUM\">8</field></shadow></value><value name=\"Y\"><shadow type=\"math_number\" id=\"XU4}#xax:?MJD=SnbVL:\"><field name=\"NUM\">80</field></shadow></value></block></next></block></next></block></next></block></statement><statement name=\"ELSE\"><block type=\"lcd_fill\" id=\"~PFvB(hm$exNuCw8dJKN\"><field name=\"COLOR\">#000000</field><next><block type=\"image_set_image\" id=\"JTGW$~M=k)eb?P+7`MnN\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">humi3.jpg</field><next><block type=\"image_set_position\" id=\"y*AW!Qr6WBBQK@~Y/*g1\"><field name=\"COMPONENT\">image0</field><value name=\"X\"><shadow type=\"math_number\" id=\"Xl-4{b;3%zzX]7K$aX!5\"><field name=\"NUM\">8</field></shadow></value><value name=\"Y\"><shadow type=\"math_number\" id=\"4tVI(qMU}[=f=@fWuLv%\"><field name=\"NUM\">8</field></shadow></value><next><block type=\"lcd_print\" id=\"7,8cIawGVG*rf$B=sb:z\"><field name=\"COLOR\">#33ccff</field><value name=\"TEXT\"><shadow type=\"text\" id=\")F3.?4T+V5}q64Mo{|!N\"><field name=\"TEXT\">35.0</field></shadow><block type=\"variables_get\" id=\"@1)PD=iA~TqNnt561*WX\"><field name=\"VAR\" id=\"+ZNwBYAH-!{CZ/oll`TV\" variabletype=\"\">humidity</field></block></value><value name=\"X\"><shadow type=\"math_number\" id=\"zC516{az1{|aBJy.mmx8\"><field name=\"NUM\">8</field></shadow></value><value name=\"Y\"><shadow type=\"math_number\" id=\"=P+Ek0h1U:Kx5),UsU=s\"><field name=\"NUM\">80</field></shadow></value></block></next></block></next></block></next></block></statement><next><block type=\"timer_delay_ms\" id=\"nTl08Oqtj*rJkLK;JH/V\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"rtM}^:@=c3_fs5i6[h+p\"><field name=\"NUM\">3500</field></shadow></value></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block><block type=\"timer_callback\" id=\"!K*4pg$q#II(?/5d7Xq@\" x=\"590\" y=\"-30\"><field name=\"name\">timer1</field><statement name=\"FUNC\"><block type=\"math_change\" id=\"Oi},X:`D26ULV-~xgrI,\"><field name=\"VAR\" id=\"ORGOs+73c1ceV/b]_#G+\" variabletype=\"\">ticks</field><value name=\"DELTA\"><shadow type=\"math_number\" id=\"}M)dFW9z1dTl2iflH=WK\"><field name=\"NUM\">1</field></shadow></value></block></statement></block><block type=\"mqtt_sub\" id=\"db*$XH63nq(yeCaWcj.N\" x=\"590\" y=\"50\"><value name=\"FROM\"><shadow type=\"text\" id=\"}WXugOOseK%(S_Fg@QxW\"><field name=\"TEXT\">PATH_TO_TEMPERATURE_FEED</field></shadow></value><statement name=\"FUNC\"><block type=\"variables_set\" id=\"i^{#;`*_}Mki=M/)Vrw_\"><field name=\"VAR\" id=\"M;K]]n?0/h/oP-W2vw1F\" variabletype=\"\">temperature</field><value name=\"VALUE\"><block type=\"mqtt_get_topic_data\" id=\"wOKIU8b/*nr#=aA[aj85\"></block></value></block></statement></block><block type=\"mqtt_sub\" id=\"d3/1UQ_kAJ;hh2Vr2$;+\" x=\"590\" y=\"150\"><value name=\"FROM\"><shadow type=\"text\" id=\"I!mz:`5^::coc$!cU4M+\"><field name=\"TEXT\">PATH_TO_HUMIDITY_FEED</field></shadow></value><statement name=\"FUNC\"><block type=\"variables_set\" id=\"c;1sFsxnl%S(4Rh*Dxv=\"><field name=\"VAR\" id=\"+ZNwBYAH-!{CZ/oll`TV\" variabletype=\"\">humidity</field><value name=\"VALUE\"><block type=\"mqtt_get_topic_data\" id=\"PO%bINcYcXgb:(`4IT|(\"></block></value></block></statement></block><block type=\"button_callback\" id=\"08QI`oay5NGt=H6+vFd4\" x=\"590\" y=\"250\"><field name=\"BUTTON\">A</field><field name=\"EVENT\">wasPressed</field><statement name=\"FUNC\"><block type=\"axp_power_off\" id=\"m7`*Ow61lj?Kh{2Y/$el\"></block></statement></block>","Blockly.Remotes":[],"modules":[]}