Dancing Robot With Pinoo
Project Purpose: To create a dancing Pinoo project with the servo motor module and distance sensor using the Pinoo Control Card.
Duration: 2 lessons
Age Group: 7 years and older
Benefits:
• Learns to code Pinoo control card.
• Learns to code the distance sensor.
• Learns to code the Servo Motor module.
• Improves the skill of setting up algorithms.
• Improves coding skill.
• Design skill develops.
Supplies
Materials to be Used: Mblock 3 program, Pinoo control card, Distance sensor, 4 Servo motor modules, Connection cables.
Materials Required for Design: 3D printed output (files available in folder), silicone gun and silicone.
To Access the .stl File of 3D Design
Design
- We attach the connection cable to the distance sensor.
- We place the distance sensor in the eyes of the output printed from the 3D printer.
- We place the servo motor modules at the bottom of the printed output from the 3D printer.
- We connect the head part and the bottom part of the printout with the help of a silicone gun as shown in the figure.
- We assemble the servo motor modules with the help of a silicon gun on the legs of the printout printed from the 3D printer as shown in the figure.
- We assemble the propellers of the servo motor modules to the legs of the 3D output with the help of a silicone gun as shown in the figure.
- NOTE: You can fix the project to the servo motor by using the screws of the propellers to make the project stable. You can then assemble the legs with the help of a silicone gun. Before screwing the propellers, be sure to code the servo motor modules to 90 degrees!
- With the help of a silicon gun, we assemble the servo motor modules on the upper part of the legs of the 3D printout as shown in the figure.
- We connect the legs of the 3D output with the servo motor modules as shown in the figure.
- NOTE: Before combining the parts with servo motor modules, be sure to turn the servo motors to 90 degree position by looking at the coding section.
- We connect the legs of the 3D output with the servo motor modules as shown in the figure.NOTE: Before combining the parts with the servo motor modules, be sure to turn the servo motors to 90 degree position by looking at the coding part.
- We connect the servo motor modules with the modules in a way that corresponds to Brown cables-GND, Red cables-5V, Orange cables-D0.
- We connect the connection cables of the servo motor modules to the Pinoo control card in accordance with the figures in the photo.
- We plug the connection cable of the distance sensor into the purple / green input number 6 and mount the Pinoo control board on the dancing Pinoo with the help of a silicon gun.
- NOTE: You can mount the Pinoo control board on the dancing Pinoo after you finish coding.
- Let's mount the servo motor modules to the dancing Pinoo with the help of a silicon gun.
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.
Connecting the Pinoo Sensor Board to the Computer
- 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
- In the coding part; To start the application, we get the code when the Green Flag is clicked from the Events menu.
- We get help from the dummy in order to learn the value read by the distance sensor. For this, we get the "say hello" command from the view tab. Instead of the word Hello, we get the code block for the distance sensor from the robots tab.
- We change the pin input to Pinoo 6 that we connect. Since we want it to do the reading process continuously, not once, we take all our codes into the continuous repeat block from the control tab.
- We click on the green flag and zoom in and out of the distance sensor. Here, when we get our hand closer, we will take as a reference that it reads less than 10.
- When the Green flag is clicked from the Events menu, we take the command and turn all servo motor modules to 90 degrees. .
- We get the continuous repeat command from the control menu and if we take the command and put it into the continuous repeat command. Then, if the value measured by the distance sensor is less than 10 and greater than 0, we have the operations done.
- Then, if the value measured by the distance sensor is smaller than 10 and greater than 0, we say keep a number between 1 and 3. And if the number it holds is equal to 1, we make our robot dance by moving the servo motor modules randomly.
- Then we fasten the number again and if the number is equal to 2, we write the codes that will move the servo motor modules for different dance movements.
- We attach a number again and if the held number is equal to 3, we write the codes that will move the servo motor modules. Thus, the robot will make different dance figures with each of our han
- We get the if command from the control menu. If the value measured by the distance sensor is greater than 10 or equal to 0, we move the servo motor modules in the direction of 90 degrees.
- We click on the Green Flag button and check our project. If there is no problem in the operation of our project, we need to load the codes we have written into our card in order to run our project with a power source independent of the computer.
- For this, we throw away the "Click on the green flag" code we used at the beginning and the code that we made the puppet tell the sensor value, and get the Pinoo Program code from the Robots menu.
- Right click on the code and click the Upload to Arduino option. (We work with arduino as a card.)
- In the window that opens, we click the Upload to Arduino button again.We are waiting while our codes are being loaded to the card. After saying the installation is finished, we click on the close button.
Working Status of the Project
- 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 the on / off button right next to the battery input to the ON position.
- If the value measured by the distance sensor is greater than 10, our robot will remain stable at 90 degrees
- When we put our hand in front of the distance sensor, that is, when the value measured by the distance sensor is less than 10, it will keep between 1 and 3 numbers and move with different dance figures each time.