Growth Box With Pinoo

 

 

Purpose of the Project: To make a system in which we use Pinoo Control Card temperature-humidity sensor, buzzer module, yellow and green led module, temperature-humidity sensor and soil moisture sensor to indicate that the soil needs water in our feed box and warn when there is any high temperature.

 

Duration: 2 lessons

Pinoo Set: Inventon Set, Full Set.

Age Group: 7 years and over

 

Gains:

• Learns to code Pinoo control card.

• Learns to use temperature sensor.

• Learns to use buzzer module.

• Improves the skill of setting up algorithms.

• Improves coding skill.

 

Materials to be used: Mblock 3 program, Pinoo control card, temperature-humidity sensor, buzzer module, soil-humidity sensor, green and red led module, connection cables.

 

KODLAMA

Materials Required for Design: Dekota, brown eva, scissors, utility knife, silicone gun and silicone.

 

 

Project Preparation:

 

For our project, we first arrange our dekota material.

We combine the decota parts with the help of a silicone gun as in the picture.

 

We cover the bottom of our feeding box with brown eva.

With our buzzer module, we fix our temperature-humidity sensor with the help of a silicone gun.

 

Then we fix our red and green LEDs on the front of our box.


We fix our soil-moisture sensor as shown in the picture so that the soil touches the inside of our box.

 

Then we connect our green led to door number 2, red led to number 5, temperature-humidity sensor to number 4, buzzer module to door number 3, and soil-moisture sensor to door number 7.

 

  1. Adding Pinoo extension:


 

From the Extensions tab, we click on the "Manage Extensions" option.


 

In the window that opens, we type "Pinoo" into the search engine and simply say download to the result.

It was installed on our computer.

 

  1. Connecting the Pinoo sensor board to the computer:

 

 

 

In Mblock 3, we click on the "Connect" tab on the upper left.

 

 

We click on the "Serial Port" section from the window that opens and select the "COM6" option from the page that opens.

 

NOTE: Since the port entries of each computer are different, the numbers next to the COM text may change.

We click on the Cards tab.

 

 

We select the "Arduino Nano" card option used by the Pinoo sensor card from the window that opens.

 

 

We click on the Extensions tab.

 

In the window that opens, we select the extension "Pinoo" of the sensor card we use.

 

We click on the Connect tab.

We click on "Firmware Update" from the window that opens.

 

Coding part:

 

 

 

First, we place our temperature-humidity sensor identification code under the "Pinoo Program" code to check whether our temperature-humidity sensor is working. Then we print our temperature-humidity sensor values ​​to the serial port and upload it to Arduino. Then we change the "recv encode mode" option to "capital state" at the bottom right of our mblock program. In this way, we see our temperature-humidity sensor values ​​on the serial port. After uploading our codes to Arduino, let's not forget to reconnect from the program link connect section.

When the green flag is clicked, we control our buzzer module by running it with a sound code under the code.

 

In order to check whether our soil-moisture sensor is working or not, we read the values ​​of our sensor with the soil moisture value arrow code into the ‘hello’ code in a continuous repeat cycle under the green flag code.

 

In order to check whether our red and green led module is working or not, we check the status of our led by saying ‘high’ and ‘low’ by using the change led status code under the code when the key is pressed.

 

When the green flag is clicked, we cannot operate our temperature-humidity sensor under its code. Therefore, we are introducing our temperature-humidity sensor to our program with our code under the Pinoo program code.

 

If the value we get from the soil-moisture sensor is less than 400, that is, if our soil is dry, our red LED will light up and our green LED will turn off. If not, that is, if the water in my soil is sufficient, we turn on our green LED.

Then our second condition is that if the ambient temperature is greater than 35 degrees, our buzzer module is activated. If not, we disable our buzzer module.

 

We right click on the "Pinoo Program" command and select the "Upload to Arduino" option in the window that opens.

 

 

 

On the page that opens, we click on the "Upload to Arduino" button selected in red.

Our codes are uploaded to our Pinoo control card.

We click on the "Close" button after the "Download Finished" text appears. After the installation is finished, the battery compartment is inserted and the project is run.

 

 

 

  1. Working Status of the Project:

 

 

If the value of our temperature-humidity sensor is more than 35 degrees, we will get an audible warning, otherwise our buzzer module will become passive. If our soil is dry, the red led will light up, if it is wet, our green led will turn on.

ARDUINO IDE CODE: 

#include <dht11.h> // dht11 kütüphanesini kodlarımıza dahil ettik.
int dhtPin=2; // Sıcaklık-nem sensörümüzün 2. pine bağlandığını belirttik.
dht11 sicakliksensor; // sicakliksensor adında bir DHT11 nesnesi oluşturduk.
int topraknemPin=A0;//Toprak-nem sensörümüzü taktığımız pini tanıttık.
int yesilLed=2;//Yeşil ledi hangi pine taktığımızı belirttik.
int kirmiziLed=5;//Kırmızı ledi hangi pine taktığımızı belirttik.
int buzzerPin=4;//Buzzer modülümüzü hangi pine taktığımızı belirttik.
void setup() 
{
  pinMode(topraknemPin,INPUT);//Torpak-nem sensörümüzün giriş birimi olduğunu belirttik.
  pinMode(yesilLed,OUTPUT);//Yeşil renkli ledimizin çıkış birimi olduğunu belirttik.
  pinMode(kirmiziLed,OUTPUT);//Kırmızı renkli ledimizin çıkış birimi olduğunu belirttik.
  pinMode(buzzerPin,OUTPUT);//Buzzeer modülümüzün çıkış birimi olduğunu belirttik.
}

void loop() 
{
  float sicaklik = sicakliksensor.read(dhtPin);//Sıcaklık- nem sensörümüzden aldığımız değeri sicaklik adında oluşturduğumuz değişkene aktardık.
  int veri=analogRead(topraknemPin);//Toprak-nem sensörümüzden aldığımız analog değerleri sayısal veri tipinde oluşturduğumuz veri adındaki değişkene aktardık.
  if(veri<400)//Eğer toprak-nem sensörümüzden aldığımız değer 400'den küçük yani toprağımız kuru ise koşulunu oluşturduk.
  {
    digitalWrite(kirmiziLed,HIGH);//Kırmızı ledimizi yaktık.
    digitalWrite(yesilLed,LOW);//Yeşil ledimizi her ihtimale karşı söndürdük. 
  }
  else//Yukarıda belirttiğimiz koşul sağlanmaz ise koşulunu oluşturduk.
  {
    digitalWrite(yesilLed,HIGH);//Yeşil ledimizi yaktık.
    digitalWrite(kirmiziLed,LOW);//Kırmızı ledimizi her ihtimale karşı söndürdük. 
  }
  if(sicaklik>35)//Eğer sıcaklık değeri 35 dereceden büyük ise koşulunu oluşturduk.
  {
    digitalWrite(buzzerPin, HIGH);//Buzzer modülümüzü aktif hale getirdik.
  }
  else//Yukarıda oluşturduğumuz koşul sağlanmaz ise koşulunu oluşturduk.
  {
    digitalWrite(buzzerPin, LOW);//Buzzer modülümüzü pasif hale getirdik.
  }
}


WITH PINOO SETS, CHILDREN CAN DO HUNDREDS OF PROJECTS WITH MATERIALS THAT CAN COMFORTABLY AT HOME.