Goal Counter with Pinoo
Purpose of the Project: To make a system that makes a sound from the buzzer by counting every ball that enters the goal by using the Pinoo Control Card, ultrasonic distance sensor, buzzer module and LCD display module.
Duration: 2 lessons
Age Group: 11 years old and over
Pinoo Set: Maker set and full set.
- Learns to code Pinoo control card.
- Learns to use ultrasonic distance sensor.
- Learns to use an LCD screen.
- Learns to use buzzer.
- Improves the skill of setting up algorithms.
- Improves coding skill.
Materials to be used: Mblock 3 program, Pinoo control card, ultrasonic distance sensor, buzzer module, lcd display module, connection cables.
Materials Required for Design: White cardboard, green mirror cardboard, wooden stick, white electrical tape, utility knife, silicone gun, and silicone.
For our project, we first take our wooden sticks.
We combine our wooden sticks with the help of a silicone gun to give a castle appearance.
For the back of our castle, we cut our white cardboard as shown in the picture. (Cardboard dimensions must be the same as the cardboard dimensions.)
We stick the white cardboard we made for the back of the castle to the back of our wooden sticks for the castle.
We stick our pencil to the green mirrored cardboard floor with the help of a silicone gun.
Then we determine our goal line with a white tape. For the lines of the penalty area, we complete it with white cardboard.
We place our LCD display module, distance sensor and buzzer module as in the picture. We adjust our distance sensor to look at the ground so that we can see the ball passing. In this way, we finish our design part.
Adding Pinoo extension:
We click on the "Serial Port" section from the opened window and select the "COM6" option from the opened page.
NOTE: Since the port entries of each computer are different, the numbers next to COM text can vary.
First, we place our LCD screen identification code under the "Pinoo Program" code to check if our LCD display module is working. Then, we place the 'Pinoo LCD Print' code and upload it to arduino. After the installation, we see the text "Hello World!" On our LCD screen. In this way, we check the working status of our LCD screen.
When the green flag is clicked, we control our buzzer module by running it with a sound code under its code.
First, to check whether our ultrasonic distance sensor is working or not, we check the working status of the distance sensor with our 'Say Hello' code under the 'When Clicked' code on our panda puppet.
To count our goal numbers, we create a variable from the Data & Block section and say 'count' in the name of our variable.
Since we cannot operate our LCD screen under the "Green Flag" event, we transfer our count variable to 0 under the "Pinoo Program" event. We place our prepare code to introduce our LCD screen. At first we saw that our distance sensor reads 12 cm. According to this value, when the value of our distance sensor is less than 10 cm, our buzzer module will work for half a second. Then, we printed the text "Number of Goals:" (no Turkish characters) on the 1st Line, 1st Column of our LCD screen. Then, since the text we printed was 13 characters, we printed our count variable from row 1, column 14, and increased our count variable with 1 second intervals.
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 selected in red.
Our codes are uploaded to our Pinoo sensor 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.
Working Status of the Project:
We have reflected our goal values on our LCD screen and we have completed our project. See you in another project.