Skip to content
International Shipping
Wish Lists Cart
0 items

#12 Smart Cooler Project With PicoBricks

17 Nov 2023
#12 Smart Cooler Project With PicoBricks

Air conditioners are used to cool in the summer and warm up in the winter. Air conditioners adjust the degree of heating and cooling according to the temperature of the environment. While cooking the food, the ovens try to raise the temperature to the value set by the user and maintain it. These two electronic devices use special temperature sensors to control the temperature. In addition, temperature and humidity are measured together in greenhouses. In order to keep these two values in balance at the desired level, it is tried to provide air flow with the fan.

In PicoBricks, you can measure temperature and humidity separately and interact with the environment based on these measurements. In this project, we will prepare a cooling system that automatically adjusts the fan speed according to the temperature. You will learn the DC motor operation and motor speed adjustment.

Details and Algorithm

First, our code will display the temperature values ​​measured by the DHT11 temperature and humidity sensor on PicoBricks. Then, we will define a temperature limit for the DC motor connected to PicoBricks to start running when the temperature value reaches this limit, and to stop when the temperature value falls below the limit.


1X PicoBricks
1X Sound Sensor
3X Jumper Cable

Wiring Diagram

You can code and run Picobricks’ modules without wiring. If you are going to use the modules by separating them from the board, you should make the module connections with grove cables.

MicroBlocks Codes of the PicoBricks

You can access the Microblocks codes of the project by dragging the image to the Microblocks Run tab or click the button.


Microblocks Run Tab

MicroPython Codes of the PicoBricks


from machine import Pin
from picobricks importDHT11import utime

LIMIT_TEMPERATURE=20 #define the limit temperature

dht_sensor =DHT11(Pin(11, Pin.IN, Pin.PULL_DOWN))
m1 =Pin(21, Pin.OUT)
dht_read_time = utime.time()
#define input-output pins

while True:if utime.time()- dht_read_time >=3:
        dht_read_time = utime.time()
        temp= dht_sensor.temperature
        print(temp)if temp >=LIMIT_TEMPERATURE:
            #operate if the room temperature is higher than the limit temperature

Arduino C Codes of the PicoBricks


#define DHTPIN11
float temperature;voidsetup(){// put your setup code here, to run once:
  dht.begin();pinMode(21,OUTPUT);}voidloop(){// put your main code here, to run repeatedly:delay(100);
  temperature = dht.readTemperature();
  Serial.print("Temp: ");
  Serial.println(temperature);if(temperature >LIMIT_TEMPERATURE){digitalWrite(21,HIGH);}else{digitalWrite(21,LOW);}}9

GitHub Project Page
Prev Post
Next Post

Thanks for subscribing!

This email has been registered!

Shop the look
Choose Options

Edit Option

Have Questions?

Back In Stock Notification


Product SKUDescription Collection Availability Product Type Other Details

Terms & Conditions

What is Lorem Ipsum? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Why do we use it? It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
this is just a warning
Shopping Cart
0 items