isaac
Published

Smart air cooler

A smart air cooler which detects how much space is used allowing one to adjust temoerature.

IntermediateShowcase (no instructions)377
Smart air cooler

Things used in this project

Story

Read more

Schematics

2023-02-08_XiAmtMI0Ue.png

ineternal circuit part 1

internal circuit part 2

external circuit

Code

ineternal code

Python
{"components":[{"id":"____screen","createTime":1675300597278,"name":"screen","x":0,"y":0,"width":320,"height":240,"backgroundColor":"#222222","backgroundImage":"","type":"screen"},{"id":"____buttonA","createTime":1675300597278,"name":"ButtonA","buttonIndex":0,"x":35,"y":216,"width":64,"height":24,"text":"ButtonA","visibility":false,"type":"button"},{"id":"____buttonB","createTime":1675300597278,"name":"ButtonB","buttonIndex":1,"x":125,"y":216,"width":64,"height":24,"text":"ButtonB","visibility":false,"type":"button"},{"id":"____buttonC","createTime":1675300597278,"name":"ButtonC","buttonIndex":2,"x":215,"y":216,"width":64,"height":24,"text":"ButtonC","visibility":false,"type":"button"}],"type":"fire","versions":"Beta","units":[{"id":"qf*vPs1gDiMz&yir","createTime":1675302390289,"type":"servo","name":"servo_0","port":"B","default":["A","B","E","Custom"],"user_port":["21","22"],"icon":"servo.png"},{"id":"78_mG-5bThg-BoGl","createTime":1675302390289,"type":"rfid","name":"rfid_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":"rfid.png"}],"hats":[],"blockly":"<block type=\"basic_on_setup\" id=\"setup_block\" deletable=\"false\" x=\"30\" y=\"30\"><next><block type=\"servo_unit_write_angle\" id=\"h4qLf+I#iAEiBB.[X%Z=\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"]bg]g8jN?i{sm200[g@?\"><field name=\"NUM\">0</field></shadow></value><next><block type=\"basic_on_loop\" id=\")4`his}6P.0aya2e45rI\"><statement name=\"LOOP\"><block type=\"controls_whileUntil\" id=\"o@1IF%Amr}L?oO+Y-kV9\"><field name=\"MODE\">WHILE</field><value name=\"BOOL\"><block type=\"logic_compare\" id=\"IB`x)m24#EH;3Ug7Tlrc\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"rfid_cardOn\" id=\"OaZ8Gxlfqn##X]gCf[DN\"><field name=\"RFID\">rfid_0</field></block></value><value name=\"B\"><block type=\"logic_boolean\" id=\"^d8Q8He?q|95$yrD_0AB\"><field name=\"BOOL\">TRUE</field></block></value></block></value><statement name=\"DO\"><block type=\"servo_unit_write_angle\" id=\":wsb~R^V2h-qIBcXW6_v\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"}isX^4e:A|yhTAw`JfV7\"><field name=\"NUM\">90</field></shadow></value><next><block type=\"rgb_set_all\" id=\"WZ7PKc;9pyz[%^iF]Kpt\"><field name=\"COLOR\">#ff0000</field></block></next></block></statement><next><block type=\"controls_whileUntil\" id=\"9f:1wq[KPtdpVEq9VKJ?\"><field name=\"MODE\">WHILE</field><value name=\"BOOL\"><block type=\"logic_compare\" id=\"tG7$,o^d2}UkQYtFpU%$\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"rfid_cardOn\" id=\".CPsQTZeU^DG:}Oa:0kF\"><field name=\"RFID\">rfid_0</field></block></value><value name=\"B\"><block type=\"logic_boolean\" id=\"kBkQJ:?w8@=Ki6ath^F,\"><field name=\"BOOL\">FALSE</field></block></value></block></value><statement name=\"DO\"><block type=\"servo_unit_write_angle\" id=\"GFw3q@iUQ-p!`SnO|b@u\"><field name=\"VARNAME\">servo_0</field><value name=\"ANGLE\"><shadow type=\"math_number\" id=\"Q=pb51I-5MXE^B)3nQ%5\"><field name=\"NUM\">0</field></shadow></value><next><block type=\"rgb_set_all\" id=\"Q]bT]uJAq^1!KCYI5KVz\"><field name=\"COLOR\">#33ff33</field></block></next></block></statement></block></next></block></statement></block></next></block></next></block>","Blockly.Remotes":[],"Blockly.RemotePlus":[{"id":"__title","blockId":"","createTime":1675302390291,"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

isaac

isaac

1 project • 0 followers

Comments