Skip to content
International Shipping
Wish Lists Cart
0 items

#25 Smart Greenhouse IoT Project With PicoBricks

24 Oct 2023
#25 Smart Greenhouse IoT Project With PicoBricks

In this project, we will prepare a simple glass smarthouse with IOT technology and PicoBricks. We will use PicoBricks with the ESP8266 wifi module in this greenhouse. In this way, we will turn the plant-house into an object that we can track over the Internet.

Table of Contents

    Hello Maker! We will make a Smart greenhouse project today! You can check every detail here! Please get contact us when you make your own!

    The rapid changes in climate due to the effect of global warming cause a decrease in productivity in agricultural activities. In the 1500s, Daniel Barbaro built the first known greenhouse in history. Plant-houses are suitable environments for growing plants that can provide controllable air, water, heat and light conditions.

    In greenhouses, heaters are used to balance the heat, electric water motors for irrigation, fans are used to regulate humidity and to provide pollination. With the development of technology, the producer can follow the status of the greenhouse with his phone from anywhere and can do the work that needs to be done. The general name of this technology is Internet of Things (IOT)

    Special sensors are used to measure temperature, humidity and oxygen content in plant-house. In addition, special sensors measuring soil moisture are used to decide on irrigation. Electronically controlled drip irrigation systems are used to increase irrigation efficiency.

    Details and Algorithm

    The glasshouse model you will prepare will include a soil moisture sensor, and a DHT11 temperature and humidity sensor hanging from the top. A submersible pump will be placed in the water tank outside the model, and the hose coming out of the end of the pump will go to the ground in the greenhouse. Picoboard will be placed in a suitable place outside the greenhouse model.

    When Picobricks starts, it starts to broadcast wifi thanks to the ESP8266 wifi module. When we enter the IP address of Esp8266 from the smart phone connected to the same network, we encounter the web page where we will control the Greenhouse. Here we can see the temperature and humidity values. If we wish, we can start the irrigation process by giving the irrigation command.

    Components for Smart Greenhouse Project

    1X Pump
    1X Soil Humidity Sensor
    1X ESP8266 Wifi Module
    PicoBricks Smart Greenhouse Kit
    Jumper Cables
    Easy Connection Cables

    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.

    Step by Step of the Project

    1-Detach the floor of the model from the SR-2 coded part in the Greenhouse kit.

    2- Attach the pieces in the middle of the SR-3 piece to the floor of the glasshouse.

    3- Remove the inner walls of the greenhouse from the SR-4 part and attach it to the ground.

    4- Remove the arches in SR-1 and SR-3 and place them on the plant-house floor.

    5-Cover the rectangular area where soil will be placed with cling film. After irrigation, you will protect the model parts. Pour the plant soil into the greenhouse. Fill so that there is no empty space.

    6- Insert the parts of the SR-4 into the notches on the greenhouse.

    7-Thread the remaining two thin flat pieces of SR-4 through the holes on both sides of the greenhouse from the underside. This process makes the area more robust.

    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

    Microblocks Run Tab

    MicroPython Codes of the PicoBricks

    import utime
    import uos
    import machine
    from machine import Pin, ADC
    from picobricks import DHT11
    from utime import sleep
    dht_sensor = DHT11(Pin(11))
    smo_sensor = ADC(27)
    m1 = Pin(22, Pin.OUT)
    print("Machine: \t" + uos.uname()[4])
    print("MicroPython: \t" + uos.uname()[3])
    uart0 = machine.UART(0, baudrate=115200)
    def Connect_WiFi(cmd, uart=uart0, timeout=5000):
        print("CMD: " + cmd)
        Wait_ESP_Rsp(uart, timeout)
    # ... [rest of the functions]
    while True:
        res = ""
        res = Rx_ESP_Data()
        if '+IPD' in res:
            # ... [rest of the conditions]
        Send_AT_Cmd('AT+CIPCLOSE=' + connection_id + '\r\n')
        recv_buf = "" 
        print('Waiting For connection...')

    Arduino C Codes of the PicoBricks

    #define RX0
    #define TX1
    #define LIMIT_TEMPERATURE 30
    #define DHTPIN 11
    #define DHTTYPE DHT11
    #define smo_sensor 27
    #define motor 22
    #define DEBUG true
    int connectionId;
    void setup(){
      // ... [rest of the setup]
    void loop(){
        connectionId =;
        String serialIncoming = Serial1.readStringUntil('\r');
        // ... [rest of the loop]
    String sendData(String command, const int timeout, boolean debug){
      String response ="";
      long int time = millis();
      while((time + timeout) > millis()){
          char c =;
          response += c;
      return response;
    Project GITHUB 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