Firefighter Robot With PinooBot
Purpose of the Project: To create a firefighter robot with a Pinoobot, led and servo motor using the Pinoo control card.
Duration: 2 lessons
Age Group: 7 years and older
• Learns to code Pinoo control card.
• Led module learns to code.
• Learns to code the servo motor module.
• Pinoobot meets the robot.
• Improves the skill of setting up algorithms.
• Improves coding skill.
Materials to be Used: Mblock 3 program, PinooBot Robot / Pinoo control card, Servo motor module, Led module, Connection cable .
Materials Required for Design: Cardboard, double-sided tape, silicone gun, scissors
1. Cut two rectangular pieces of 16.5 cm X 10.5 and two square pieces measuring 10.5 X 10.5 from the cardboard.
2. We glue the pieces to form a box with an empty base and floor.
3.We cut two separate square pieces into the top of one of the square pieces of the box.
4. We fix the LEDs right under the square parts with a silicone gun. (Their entrances are facing the windows).
- We cut a square piece from the bottom to the other square part of the box.
- We cut another rectangle of 16.5 cm X 10.5 from the cardboard. This will be our ceiling section.
- We cut a rectangular piece of the desired length from the cardboard, draw small squares on it and cut that section. Our design will be the ladder of our fire truck.
- We fix the ladder on the propeller of the servo motor. We fix the servo motor on our rectangular piece (ceiling).
- We fix the box we have created with double-sided tape so that the LEDs are at the back of the pinooBot.
- Let's make our connections. We connect one of the leds to the purple input number 1 and the other led to the purple input number 2 with a connection cable. We connect the servo motor module to the purple input number 4. we put it through the window.
- We fix the pan section on the box with double-sided tape.
- We decorate the surface of the box as we wish, in accordance with its role.
- 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 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 all the code blocks we will write must work continuously, we are getting the repeat code block from the control tab.
- To stop the robot from moving at the beginning, we get the PinooBot ‘’Direction: Forward, Speed: 0’’ code block from the Robots tab.
While the PinooBot is not moving, the red LEDs should flash alternately. Let's create the algorithm for the flashing of the LEDs.
• Light up the red LED on the Pinoo1 door (high)
• Let the red LED on the Pinoo2 door turn off (low)
Wait 1 sec
• Let the red LED on the Pinoo1 door turn off (low)
• Light up the red LED on the Pinoo2 door (high)
Wait 1 sec
• Let the red LED on the Pinoo2 door turn off (high)
In order to turn on the red LED connected to the Pinoo1 pin, we get the "Change Pinoo LED Status: Pin Pinoo1, LED HIGH" code block from the "Robots" tab.
To turn off the red LED connected to the Pinoo2 pin, we take the "Change Pinoo LED State: Pin Pinoo1, LED HIGH" command again and update the pin section to "Pinoo2, LED HIGH" as "LOW".
- In order to keep the flashing of the LEDs in the previous step for 1 second, we get the ‘’1 second wait’’ code block from the CONTROL tab.
We repeat the same procedures by reversing the LED states. To turn off the red LED connected to the Pinoo1 pin, we take the ‘’Change Pinoo LED Status’’ from the Robots tab: Pin Pinoo1, LED HIGH command and update the LED HIGH statement to LOW.
In order to turn on the red LED connected to the Pinoo2 pin, we get the "Change Pinoo LED Status: Pin Pinoo1, LED HIGH" code block from the Robots tab. We update the pin section to Pinoo2.
- In order to ensure that the LEDs in the previous stage continue to blink for 1 second, we take the ‘’1 second wait’’ code block from the Control tab.
- To turn off the red LED connected to the Pinoo2 pin, change the Pinoo LED Status again: ‘’Pin Pinoo1, take the LED HIGH’’ command and update the pin section to Pinoo2, and the ‘’LED HIGH’’ statement to ‘’LOW’’.
- After the flashing of the LEDs is completed, we take the PinooBot Direction: ‘’Forward Speed: 0’’ code block from the Robots tab so that the PinooBot can move forward and update the Speed section to 255.
While the fireman PinooBot is moving, we want the ladder connected to the servo motor to move up and down.
From the Robots tab, we get the ‘’Servo Motor Run: PIN (Pinoo1), Pain (0)’’ command. We change the pin part to Pinoo4 and the pain part to 90.
- We receive the ‘’1 second wait’’ command from the Control tab in order for the ladder to stay upward (at a 90 degree angle) for 1 second.
- In order to bring the ladder down, we get the Servo Motor Run: PIN (Pinoo1), Pain (0) command from the Robots tab. We change the pin part to Pinoo4 and the Pain part to 0.
- We get the ‘’wait 1 second’’ command from the Control tab to keep the ladder down (at a 0 degree angle) for 2 seconds.
- In order for PinooBot to move to the right direction, we get the ‘’PinooBot Direction: Forward Speed: 0’’ code block from the Robots tab. We update the ‘’Direction’’ section to Right and the ‘’Speed’’ section to 255.
- In order for PinooBot to move in the right direction for 1 second, we get the ‘’wait 1 second’’ command from the Control tab.
- In order for PinooBot to move backward, we get the ‘’PinooBot Direction: Forward Speed: 0’’ code block from the Robots tab. We update the Direction section to ‘Reverse’ and the Speed section to 255.
- In order for PinooBot to move backward for 2 seconds, we get the ‘’wait 1 second’’ command from the Control tab. We update a number as 2.
- After completing our codes, we place it on the floor and check the operation (movements) of the PinooBot by clicking the green flag.
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 get the Pinoo Program code from the Robots menu.
- 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 the ON/OFF button right next to the battery input to the ON position.