Dinasour Game With Pinoo

by pinoorobotics in Circuits > Arduino

166 Views, 1 Favorites, 0 Comments

Dinasour Game With Pinoo

Pinoo ile Dinazor Oyunu - Dinosaur Game with Pinoo

Project Purpose: To make a dinosaur game with Pinoo control card using ldr module and servo motor.

Duration: 2 lessons

Age Group: 9 years and older

PinooSet: Basic, Invention,Maker,Full Set.

Benefits:

• Learns to code Pinoo control card.

• Learns to use servo motor.

• Learns to use the Ldr module.

• Improves the skill of setting up algorithms.

• Improves coding skill.

Supplies

Materials to be Used: Mblock 3 program, Pinoo control card, servo motor, ldr module

Materials Required for Design: Computer, black band

Project Preparation

4.JPG
5.png
6.JPG
7.JPG
8.JPG
9.JPG
10.JPG

  • For our project, let's start with the part where we will place the sensors on the computer.
  • We tape the servo motor so that it can press the spacebar.
  • Let's try to open a page while our internet is closed and the dinosaur game will appear. (If you could not reach this page, if you type "chrome: // dino" in the part where the links are, while your internet is closed, you can access the dinosaur game.
  • We stick the black tape on the back of the Ldr module so that we can stick it to the screen.
  • We stick the Ldr module to the computer screen so that we can see the trees on the screen.
  • Then we attach the connecting cable.
  • We attach the connecting cable of the servo motor.
  • We attach the Ldr module to the 7th door and the servo motor to the 1st door.
  • We connect the USB connection cable to the Pinoo control card and to the computer.
  • Now we can start coding.

Adding Pinoo Extension

a2.jpg
a3.jpg

  • 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 Control Board to the Computer

a4.jpg
a5.jpg
a6.jpg
a7.jpg

  • 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.

Coding Part

Adsız.png
Adsız2.png
Adsız3.png
Adsız4.png

  • First, when we click the green flag, we are coding to see the light value on the screen.
  • (In this section, the difference between the values is seen by placing the Ldr module in the open area on the screen and on the tree that should jump, and a value is determined to create a condition.) If not, we add the condition structure and create our condition. (Here, we used a general value of 750, which is close to the value perceived by trees. It may vary depending on the ambient light value.)
  • If the condition is true, that is, the tree is detected, we adjust the angles of the servo motor connected to the 1. door. After moving down 30 degrees and waiting for 0.1 second, we code it to 0 angle.
  • For our other condition, we add the condition structure "if it is" and create the condition that the light value should be greater than 750. If the condition is true, the angle of the servo motor will remain at 0 degrees.
  • In order to upload our codes to the Pinoo sensor card, we make the "Pinoo Program" command at the beginning of the event and delete the code we use to see the light value on the screen.
  • 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 in red.
  • Our codes are uploaded to our Pinoo control card.
  • We click on the "Close" button after the "Download Finished" text appears.

Working Status of the Project

18.png
17.JPG

  • We are installing the 9V battery.
  • It will work when we open the dinosaur game page and start the game.