Eye Movement With Pinoo
Purpose of the Project: To make an eye movement project using a servo motor and potentiometer module with the Pinoo control card.
Duration: 2 lessons
Age Group: 7 years and older
Set Used: Pinoo Invent Set
• Learns to code Pinoo control card.
• Learns to use potentiometer module.
• Learns to use servo motor.
• Improves the skill of setting up algorithms.
• Improves coding skill.
Materials to be Used: Mblock 3 program, Pinoo control card, potentiometer module, servo motor
Materials Required for Design: Colored cardboard (small), scissors and utility knife, box cover, ball, acrylic paint and brush, handcrafted paper, piece of aluminum wire, forex, silicone gun and silicon.
1. For our project, let's start with designing the eye first.
We paint the ball white with acrylic paint.
Then we paint a large blue round shape with blue paint. Then we paint a smaller black round shape in the middle of this blue round shape.
We get our first eye.
We cut part of the shoe box cover.
We cover the piece we cut with handcrafted paper and silicon.
We open a hole large enough for the ball to enter with a utility knife.
We draw and cut a hole-sized round shape that we create from A4 paper.
First, we draw a big round in the middle and a little smaller circle inside. We paint the big circle with blue paint and the inner one with black acrylic paint.
Thus, we have our second eye.
We cut a piece of colored cardboard 2x6 cm long.
We silicone the cardboard piece from the back of the box to the bottom of the hole.
We silicon the servo motor in front of the cardboard.
We shape the aluminum wire by bending it as shown in the figure.
We silicon the piece of aluminum wire that we shaped to both the servo motor and the ball.
We cut a piece of 20x20 cm from the forex with a utility knife.
We silicon the box on the forex we cut.
We silicon the potentiometer module on the side of the box.
We connect the potentiometer module and the servo motor to the Pinoo control board using the connection cables. We attach the potentiometer module to the 7th door and the servo motor to the 1st door.
We plug the USB cable into both the Pinoo card and the computer.
Now we can start coding.
2.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.
3.Connecting the Pinoo control 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 control card from the window that opens.
We click on the Extensions tab.
In the window that opens, we select the extension "Pinoo" of the control card we are using.
We click on the Connect tab.
We click on "Firmware Update" from the window that opens.
4. Coding part:
First, we write the necessary codes to see the value of the potentiometer module attached to the 7th door on the screen. We will see that the value on the screen changes as you move the potentiometer module.
We need to create a variable to keep this value. So we click on the Data / Block field and click on ‘’Create a Variable’’.
We click the OK button by typing x in the field that opens.
We have created a variable named X.
We delete the codes we created first. We start with the Pinoo Program code block. Then we make the value of the x variable 0.
We add the code block with continuous repetition.
We determine the value of the X variable as the division of the potentiometer value attached to the 7th door by 5.6.
Because the potentiometer module reads the highest value of 1023, the servo motor is 180. If we divide 1023 by 180, it will approximate 5.6. So we convert it to the same value.
We specify the angle of the servo motor mounted on the 1st door as x.
So here we code the servo motor potentiometer module to rotate as it rotates.
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.
5. Working Status of the Project:
We are installing the 9V battery.
We make sure that the Pinoo card is in ON position.
The eye will move as you move the potentiometer module.