Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
faba saaElvis ZhuoyanMarcusjiangMarthew Ng
Published

Weather report/forecast

Ability to forecast weather and temperature for farming.

BeginnerWork in progress47
Weather report/forecast

Things used in this project

Hardware components

FEETECH Standard Servo FS5106B
×1
ENV III Unit with Temperature Humidity Air Pressure Sensor (SHT30+QMP6988)
×1

Software apps and online services

M5Stack UIFLOW

Story

Read more

Schematics

Block Diagram

Flowchart

Code

Project.m5f

Python
Code
{"components":[{"id":"____screen","createTime":1675134503895,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#222222","backgroundImage":"","type":"screen"},{"id":"____buttonA","createTime":1675134503895,"name":"ButtonA","buttonIndex":0,"x":35,"y":216,"width":64,"height":24,"text":"ButtonA","visibility":false,"type":"button"},{"id":"____buttonB","createTime":1675134503895,"name":"ButtonB","buttonIndex":1,"x":125,"y":216,"width":64,"height":24,"text":"ButtonB","visibility":false,"type":"button"},{"id":"____buttonC","createTime":1675134503895,"name":"ButtonC","buttonIndex":2,"x":215,"y":216,"width":64,"height":24,"text":"ButtonC","visibility":false,"type":"button"},{"id":"CHr9fiJB$Eo%@G3C","createTime":1675135375843,"isCoreTwo":false,"isPaper":false,"name":"label0","x":10,"y":14,"color":"#FFFFFF","text":"Text","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":4},{"id":"HE2zlry#D$5-$@@6","createTime":1675135378008,"isCoreTwo":false,"isPaper":false,"name":"label1","x":54,"y":47,"color":"#FFFFFF","text":"Text","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":5},{"id":"zydJCtzt7n1Fp3WP","createTime":1675136979523,"isCoreTwo":false,"isCoreInk":false,"isPaper":false,"name":"image0","x":10,"y":100,"imagePath":"default.jpg","visibility":true,"imageInvert":false,"imageThreshold":128,"type":"image","layer":5},{"id":"&2Fxs&2RU#yhs4aG","createTime":1675141124280,"isCoreTwo":false,"isPaper":false,"name":"label3","x":10,"y":47,"color":"#FFFFFF","text":"Temp:","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":23},{"id":"Jhhu_Px!tAFi3Vu-","createTime":1675141127005,"isCoreTwo":false,"isPaper":false,"name":"label4","x":10,"y":80,"color":"#FFFFFF","text":"Humidity:","font":"lcd.FONT_Default","rotation":0,"type":"label","layer":24}],"type":"core","versions":"Beta","units":[{"id":"p=Y_3HIwWkP5iUqF","createTime":1675818772597,"type":"servo","name":"servo_0","port":"B","default":["A","B","C","E","Custom"],"user_port":["21","22"],"icon":"servo.png"},{"id":"*3W&A$XRAvv3mS1`","createTime":1675818772597,"hidden":false,"type":"env3","name":"env3_0","port":"A","default":["A","E","PAHUB","Custom"],"pb_port":[0,1,2,3,4,5],"new_pb_port":"0","user_port":["21","22"],"icon":"env3.png"}],"hats":[],"blockly":"<block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"-70\" y=\"-70\"><next><block type=\"image_set_image\" id=\"5KY4^urS#w4^z*koFIz!\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"2T7Qq}BU{?f#zds?d3@p\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"ni+K8KeT}Q~m=/3NHy3)\"><field name=\"TEXT\">Normal Weather</field></shadow></value><next><block type=\"servo_unit_write_angle\" id=\"7_/xV!om-fK+e9uqEHkL\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"_H@=ni=kVW-cD$Ls{`S.\"><field name=\"NUM\">0</field></shadow></value><next><block type=\"timer_delay\" id=\":.n#$_z4SH:)Xy{#n7+p\"><value name=\"DELAY\"><shadow type=\"math_number\" id=\"oB*eDNzD.)@~Zr._LCLQ\"><field name=\"NUM\">1</field></shadow></value><next><block type=\"basic_on_loop\" id=\"4390:anQBZJ|6V68zf8q\"><statement name=\"LOOP\"><block type=\"label_set_text\" id=\"@jJki|E5(s:-H0vcf}QA\"><field name=\"COMPONENT\">label1</field><value name=\"TEXT\"><shadow type=\"text\" id=\"RX{R?a[K,F3Yoq6MOm(C\"><field name=\"TEXT\">Hello M5</field></shadow><block type=\"dht12_get_temperature\" id=\"xF/p)K#ao.HhQ!TP_q7{\"><field name=\"VARNAME\">env3_0</field></block></value><next><block type=\"label_set_text\" id=\"NAi#4HS#@%hLQwl1+95h\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"t,4b?`RO-Y+(Bj,qbjf-\"><field name=\"TEXT\">Hello M5</field></shadow><block type=\"dht12_get_humidity\" id=\",7T}{)~ZMA!~X*3]kA3I\"><field name=\"VARNAME\">env3_0</field></block></value><next><block type=\"controls_if\" id=\"h0enr:;4l3)Pj;xk1=Mk\"><mutation elseif=\"1\" else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_compare\" id=\"s?ZeT{y,qYP~5ypn]ENN\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"dht12_get_humidity\" id=\"8ND0=e:{k|C-N+/=8iQ=\"><field name=\"VARNAME\">env3_0</field></block></value><value name=\"B\"><block type=\"math_number\" id=\",PQIvj0^1~Ad4o)W,wa]\"><field name=\"NUM\">90</field></block></value></block></value><statement name=\"DO0\"><block type=\"image_set_image\" id=\"ULR9?2m%I8VkoSnM0WgN\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"iqve4%}Nz1cc8nOabcwP\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"ruy]nR}r24?OO?.9d?vk\"><field name=\"TEXT\">ITS GONNA RAIN!!!!</field></shadow></value><next><block type=\"servo_unit_write_angle\" id=\"tp#UhUPZNZ4F~(+/4e83\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"H^nI2jR1#({^UkIu:bgP\"><field name=\"NUM\">90</field></shadow></value></block></next></block></next></block></statement><value name=\"IF1\"><block type=\"logic_compare\" id=\"H@KV$A:A^,5dk_kr6R}A\"><field name=\"OP\">LTE</field><value name=\"A\"><block type=\"dht12_get_humidity\" id=\"rCW=(ahV$`A~0zI(h)DW\"><field name=\"VARNAME\">env3_0</field></block></value><value name=\"B\"><block type=\"math_number\" id=\"ii`iRY;M~iBw;O/0}KHu\"><field name=\"NUM\">79</field></block></value></block></value><statement name=\"DO1\"><block type=\"image_set_image\" id=\"ALfVH5crLMh.JG^/*MK]\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"qy$h.aDv.L1BIB//qoiJ\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"d44g@bdq*1nNwr_0mYaT\"><field name=\"TEXT\">LOW HUMIDITY!!!</field></shadow></value><next><block type=\"servo_unit_write_angle\" id=\"l7q${7/^kK{#ODA7X+mZ\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"2H*?#sdYw1`0XHOT1r9.\"><field name=\"NUM\">180</field></shadow></value></block></next></block></next></block></statement><statement name=\"ELSE\"><block type=\"image_set_image\" id=\"Zt2HT=4!p[hnD(k;0fS-\"><field name=\"COMPONENT\">image0</field><field name=\"IMAGE\">default.jpg</field><next><block type=\"label_set_text\" id=\"Eu#;|/j1=cCAd~2jye:T\"><field name=\"COMPONENT\">label0</field><value name=\"TEXT\"><shadow type=\"text\" id=\"xX2Bw[9wI%s-Y_xMgxp)\"><field name=\"TEXT\">Normal Weather</field></shadow></value><next><block type=\"servo_unit_write_angle\" id=\"Y5]oDa?kaR@C+57U#T[_\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"h(XT6T)0I~X*rz`I?QaA\"><field name=\"NUM\">0</field></shadow></value></block></next></block></next></block></statement></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block>","Blockly.Remotes":[],"Blockly.RemotePlus":[{"id":"__title","blockId":"","createTime":1675818772597,"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":[],"cbIdList_":[],"eventCBIdList_":[]}

Credits

faba saa
1 project • 0 followers
Elvis Zhuoyan
1 project • 0 followers
Marcusjiang
1 project • 0 followers
Marthew Ng
1 project • 0 followers
Thanks to .

Comments