Paint Brush With Pinoo
Purpose of the Project: To create a button module and dc motor and button paint brush system using the Pinoo control card.
Duration: 2 lessons
Age Group: 9 years and older
Benefits:
• Learns to code Pinoo control card
• Learns to code the button module.
• Dc engine learns to code.
• Improves the skill of setting up algorithms.
• Improves coding skill.
Materials to be Used: Mblock 3 program, Pinoo control card, Button Module, Dc engine, Connection cable.
Materials Required for Design: Forex, pad cotton, cylinder 3D printout, scissors, silicon gun, paint, tape
Project Preparation:
We divide the pad cotton into two separate parts and cover the circumference of our cylinder in 2-3 layers with the help of a silicon gun.
Cut four rectangular pieces of 3 cm width from Forex.
We fix one of the parts to the engine with the help of a silicon gun.
We fix another part to the motor.
We fix the third part, leaving the rod part of the motor on top.
We fix the motor cables with tape to the interior.
In the middle of our last rectangular piece, we open a 2x1 cm horizontal rectangular window. We attach the button module to the upper part of the rectangle and pass the cable through the window and take it inside.
We fix the part that we affixed the button module to the idle part of the engine.
*** Cables should be visible from the bottom section. If you wish, you can shorten the length of the parts at this stage.
We cut a piece of forex off the upper part of the engine.
Cut two square pieces of 10.5 x 10.5 cm and two rectangular pieces of 10x4 cm from Forex. If you wish, you can color the pieces by painting them at this stage.
We open a 2x2 cm square window in the middle of one of our square pieces.
We fix this square piece at the bottom of the design we created with the engine.
*** We hang the motor and button cables through this window.
Let's make our connections. We connect the motor cable from suitable inputs for the motor to A1 / A2 input (right), and the button module to the purple input number 4 with a connection cable.
We fix the other square piece under our Pinoo board and the rectangular pieces to form a wall.
We attach the cylinder part to the engine.
You can decorate the design as you wish.
We have completed our connections and design. 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 a 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 on the ‘Pinoo’ option. We will write our codes with the ‘’Pinoo’’ extension.
In the coding part; To start the application, we get the code when clicking the Green Flag from the Events menu.
Since we want all the code blocks we will write to run continuously, we start by taking the code block with continuous repetition from the control tab.
We will get help from the dummy to learn the value of the button module. For this, we get the Hello command from the View tab. Instead of the word ‘Hello’, we take the code block for the button module in the Robots tab. We change the pin input to Pinoo4 that we connect.
Let's click on the green flag and observe the values it receives by pressing the button on the sensor.
If the value of the button is 1, that is, if the button is pressed, the motor does not start (if the value is 0), the motor stops working. Now let's make this the code we wrote.
To create the Condition (If) loop, we get the expression ‘’if not’’ 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 button module from the Robots tab. We change the pin number to Pinoo4. In the second box, we write 1.
If the button value is equal to 1, the motor, the brush, must rotate. For this, we get the command Pinoo Bot Wheel: Right Side Forward Speed 0 from the Robots tab. We change the speed section to 255.
If the button value is not 1, that is, if the button is not pressed, the motor / brush must be stationary. If not, we get the Pinoo Bot Wheel: Right Direction Forward Speed 0 command from the Robots tab for the section.
After completing our codes, we check the operation of our project by clicking the green flag. When we press the button, our brush should be rotating. When we take our hand off the button, our brush should stop.
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 take the code for the Pinoo program from the ‘’Robots’’ menu by throwing the code we used at the beginning, click on the green flag and the code that we have told the puppet the button value.
Right click on the code and click on Upload to Arduino. (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.
WITH PINOO SETS, CHILDREN CAN DO HUNDREDS OF PROJECTS WITH MATERIALS THAT CAN COMFORTABLY AT HOME.