Smart Cabin

Aim of the Project: To make a cabin system project using the motion detection sensor and led module with Pinoo control card. If there is movement in the cabin of the project, the led is on, if not, the led is off.

Time: 2 lessons

Age Group: 9 years old and above

Main goals:

  • Learns to code the Pinoo control card.
  • Learns to use led module.
  • Learns to use motion detection sensor.
  • The ability to establish algorithms improves.
  • Coding skill improves.

 

Required Materials: Mblock 3 program, Pinoo Control Card, led module, motion detection sensor.

 

 

Materials Required for Design: Cardboard, colored cardboard, silicone gun and silicone.

 

Implementation of the Project:

  1. Let's start with designing a cabin for our project first. We create the ground with cardboard.

We get 4 pieces of rectangular pieces of the same size and 1 piece of square.

 

We obtain cardboard pieces of equal length and cardboard pieces that we cut before.

 

We glue colored cardboards and cardboard pieces.

 

We set the same dimensions to accommodate the motion detection sensor.

 

We cut the place we set.

 

We determine the place for the led module.

 

We cut the place we determined earlier.

 

We combine the parts

 

The cut places should be positioned like that.

 

We place the sensors.

 

It will look like this from the back.

 

We put the Pinoo control card.

 

2. Adding the Pinoo extension:

We click on “Manage Extensions” option from the Extensions tab.

 

In the window that opens, we write "Pinoo" in the search engine and it is enough to press the download button. It was installed on our computer.

 

3. Connecting the Pinoo control card to the computer

 

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

 

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

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

 

We click on the Cards tab.

 

From the window that opens, we select the “Arduino Nano” card option, because we will use pinoo control card.

 

We click on the Extensions tab.

 

In the window that opens, we determine the extension of the control card we use as "Pinoo".

 

We click on the Connect tab.

 

We click on “Firmware Update” from the window that opens.

 

4. Coding part:

In order to see the values of the motion detection sensor on the puppet, we place the read motion sensor read code inside the “Say” command. We use the "repeat continuously" command to see the values during the program run.

 

If there is no movement, we see the value "0".

If there is movement, we see the value "1".

 

Let's burn our led modules under the command 'when the key is pressed'.

 

Since our event is about motion and non-motion, we use 2 'if-else' commands and we equalize the values given by the motion detection sensor.

 

We synchronize the values to the motion detection command.

 

If “0” is equal, the led will not light, so it will be “low”, if “1” is equal, the led will light, so it will be “high”.

 

In order to upload our codes to the Pinoo Control Card, we make our event start “Pinoo Program” command and delete our “Say” command. Because there is no puppet on the card system.

 

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 the "Upload to Arduino" button, which is selected in red.

 

Our codes are uploaded to our Pinoo Control Card.

 

After the "Loading is Over" text, we click the "Close" button. After installation, the battery is installed and the project is run.

 

5. Final version of the project:

 

After the installation of the program, we connect it with a 9V battery to run the project regardless of the computer.

 

If there is movement, the led is on in the cabin.

 

If there is no movement, the led does not light in the cabin.