Step Counting With Pinoo

Purpose of the Project: To create a system that calculates the number of steps using the Pinoo control card with tilt and impact sensor and LCD screen.

Duration: 2 lessons

Age Group: 9 years and older

Set Used: Full Set

Benefits:

• Learns to code Pinoo control card

• Learns to code inclination and impact sensor.

• Learns to code the LCD display module.

• Improves the skill of setting up algorithms.

• Improves coding skill.

 

Materials to be Used: Mblock 3 program, Pinoo control card, tilt and impact sensor, lcd display module, connection cable

 

Materials Required for Design: Forex, scissors, silicone gun, paint, felt

                      

 

Project Preparation:

 

We cut two 12 x 12 cm square pieces (floor and ceiling) from forex.

 

We cut four rectangular pieces to create a 12 x 5 cm wall.

 In one of the walls we open two windows the size of an LCD screen and a tilt and impact sensor. We fix the LCD screen and the tilt and impact sensor to the areas with a silicon gun.


We fix the two different walls to the piece that we have mutually determined as the ground.

 

We fix the LCD screen and the wall where we fix the tilt and impact sensor to the floor.

We drill two small rectangular holes in the middle of the piece we designated as the ceiling.

We cut a 30 x 4 cm strip from felt. We pass the ends of the strip through the holes we created in the previous step and fix it together.

We fix the ceiling piece to our box.

Let's make our connections. We place our Pinoo control board in the box and fix the inclination and impact sensor to the purple input number 1, and our LCD screen to the red / white input number 10.

 

We decorate the design as we wish.

 

We have completed our connections, now let's move on to the coding part. We will use the mblock-3 application for this.

 

Let's connect our Pinoo control card to the computer with the help of the connection cable and enter the Mblock3 application. Then let's introduce our Pinoo control card to the computer. To do this, we first click on the serial port option from the Connect tab. Then we select COM3. (The number may differ according to the computer and the port.)

 

After making the serial port connection, let's select the card we will use from the Cards tab. We are working with Arduino Nano model.

 

 In order to add the Pinoo extension to our computer, we click on the Manage Extensions option from the Extensions tab. In the window that opens, we type "Pinoo" in the search engine and just click download to the result. It has been installed on our computer.

 

We come to the Extensions tab again and click the Pinoo option. We will write our codes with the Pinoo extension.

 

In the coding part; We start our codes with the Pinoo program block in the Robots tab, since the LCD screen can only run its unique code blocks if it is uploaded to the arduino card.

 

 We are introducing the type of our LCD screen. The type of LCD screen we use is the 0x27 model.

 

 

 We will make use of variables to count every move we make. In this step, we create a variable named step number by clicking the Create a Variable button in the Data & Block Tab.

*** We can see our variable in the upper right corner of the stage.

 

From the Data & Block tab, we get the code block, if the step count is 0. Thus, our step count will automatically be reset when our system is running.

 

Since all the code blocks we will write after completing the initial steps have to work continuously, we get the code block from the Control tab continuously.

 

We will print a caption on the first line of the LCD screen. From the Robots tab we get the command "Print Pinoo LCD: Address 0x27 Line: 1 column: Write 1". We are updating the ‘column’ section as 4 and the ‘write’ section as "Number of Steps".

 

When we put on our design like a bag and start walking, each swing / movement will be perceived as a step. Here we will perceive the motion with the inclination that our sensor will measure. Now let's convert these requests into code.

 

The inclination and impact sensor gives a value of 1 when it is inclined, and 0 when it is stationary. We will create a condition expression to be able to operate according to the value 1 received by the sensor. If not, we get the statement from the Control tab.

 

To create the condition section, we get the equals statement from the Operations tab. In the first box, we place the code block related to the inclination and impact sensor from the Robots tab. We change the pin number to Pinoo1. In the second box, we write the number 1, which indicates that the sensor has been hit.

 

If the condition is fulfilled, the number of steps should increase by one every 1 second. For this, we get the ‘step number increase by 1’ command from the ‘’Data & Block’’ tab. Then we get the ‘wait 1 second’ code block from the Control tab.

We get the command ‘Pinoo LCD print’ from Robots tab: Address 0x27 Line: 1 column: 1 write in order to show the step number on the second line of the LCD screen, ie under the title. We update the row section as: 2 column section and 6 write section as the number of steps. We get the *** step number text as a block from the Data & Block section.

 

We had to load our codes into arduino to see if there was any problem in the operation of our project. To do this, right click the Pinoo program on the code block and click the Upload to Arduino option... (We work with arduino as a board.)

 

We are waiting for the codes to be uploaded to the card. After the installation is complete, we close the window.

 

If there is no problem, we disconnect our power cable from the computer. We power our Pinoo Control board with the help of a 9v battery and a battery cap. We also turn on the on / off button next to the battery input.

 

 

We start walking by holding the handle of our system like a bag. You can follow your step count on the LCD screen.

 

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