Towel Matic with Pinoo

Purpose of the Project: To make a towel that automatically opens when it sees an object by using ultrasonic distance sensor and DC motor with Pinoo control card.

Duration: 2 lessons

Age Group: 9 years old and over

Pinoo Sets: PinooBot Kit and full set.


  • Learns to code Pinoo control card.
  • Learns to use ultrasonic distance sensor.
  • Learns to use DC motor.
  • Improves the skill of setting up algorithms.
  • Improves coding skill.


Materials to be used: Mblock 3 program, Pinoo sensor card, ultrasonic distance sensor, DC motor, connection cables.




Materials Required for Design: Utility knife, scissors, tongue stick, ice cream stick, cardboard box, silicone gun and silicone.





Project Preparation:


 For our project, we first covered our box with yellow cardboard.


 We drill holes for distance sensor and DC motor in our box.


We cut the middle of the white part of our DC motor so that the tongue stick is inserted, and then we cut a small piece of the ice cream stick and stick it to the tongue stick so that the paper roll does not slip.


We place the tongue stick on the DC motor in this way and fix it with a silicon gun. (Sticking the tongue stick flat is very important for the DC motor to rotate while rotating)


We fix the DC motor with a silicon gun where we previously drilled a hole on the side. Then we do not forget to fix the distance sensor.


This is the final version of our box after placing the materials.


To decorate, we fix the mouth-shaped black cardboard with a silicone gun to give a face image.


We also put in our paper towel and complete the design part of our project.


  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:
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 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 part:

 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 start the DC motor, we run it under the "button is pressed" command. We controlled the DC motor by running it forward at a speed of 150.


If the value of our distance sensor is less than 5 cm, that is, when we see any object, our DC motor will go forward at 150 speed for 1 second and our DC motor will stop. If the value of our distance sensor is larger than 5 cm, that is, if there is no object, our DC motor will not move.


In order to upload our codes to the Pinoo sensor card, we make the "Pinoo Program" command at the beginning of the event.


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. 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 bay is inserted and the project is run.


Working Status of the Project:


When any object passes in front of the ultrasonic distance sensor, our DC motor will run for 1 second and our paper towel will be opened. See you in another project ...