Skip to main content

Posts

Traffic Light with Mblock - 2

  In our previous application, I explained how to make a Traffic Light Application inArduino with Mblock . In this application, we will find the number of vehicles passing the red light by making additions to the mblock with the traffic light application First of all, we find a traffic light on the internet. At first, all the lamps are dark, by painting the red light, by painting the red and yellow light, by painting the yellow light, and finally, by painting the green  and green light, the sprite has 5 disguises in total. When each LED is on, which LED will light up, it will be disguised. After adding our traffic light, we add a road image to the background decor. In addition, we find a car picture on the Internet for the car that will pass on the road and add it. I drew a line on the road and painted it red in order to detect the people passing through the red light.   Now it's time to move the car. Below are the codes that we will write inside the car1 sp...

A Digital Footprint Test with Scratch

       In the lesson, we will do the digital footprint test of our students with scratch. For this, we add a sprite to our screen that will give instructions to the test, and 2 buttons for yes and no answers. Since the answers to the questions we ask will be yes and no, we create variables that will keep the number of yes and no. At the end of the test, we multiply the sum of the yes numbers by 2 and the sum of the no numbers by 1. We assign the result to the yes score and no score variable. We add the values ​​in these variables and assign them to the total score variable. The numerical values ​​of the result have a corresponding value. I will give them at the end of the article. Let's move on to the coding part;        We write the following codes inside our human sprite.           When the green flag is clicked, we set the variables that hold the total result to 0. The purpose of zero is that when we restart the test,...

Computer Input and Output Hardware Units Game Making with Scratch

 In this application, we will make a game of computer input and output hardware units with the scratch program. The game will be as follows; The user will be prompted to drag and drop pieces of hardware into the input and output device areas. If the user places the piece of equipment in the correct area, he will receive 5 points, if he places it in the wrong area, he will lose -5 points. Now it's time to code our game in the scratch program. First of all, we draw the sprites on which we will place the input and output hardware units from the costumes menu. After that, we add the hardware units that we downloaded to our computer before and the emoji expressions and the sound of applause when it is right or wrong. Let's come to the code part;   If the person playing the application places the equipment in the correct area, he will gain 5 points, if he places it in the wrong place, he will lose -5 points. For this we need a variable to hold the score. We create a variable calle...

Traffic Light with Mblock

 We will make a traffic light application with the Mblock program. Before moving on to the codes, the list of materials we will need in our traffic light circuit:   1-Arduino Uno 2-BreadBoard 3-3 LEDs 4-3 pieces of 220Ω Resistor 5-Jumper Cables We need supplies.   Note: We need LEDs that give red, yellow, green light. If you are going to use white colored leds, you need to identify the leds that give the above 3 colors one by one before the application. We add 220 ohm resistors to the long leg of the LEDs we add to our breadboard. We connect one leg of the resistors with a jumper cable to the digital pins 2,3,4 on our ardunio uno material (I connected the green led to the digital pin 2, the yellow led to the number 3, and the red led to the number 4). We connect it to the GND (negative) terminal. The circuit diagram is given below. Now let's come to our codes in mBlock; In the Mblock program, we add the Arduino program starter code from the Robots menu. ...

2 Level Game Making With Scratch

 We will make an example of a game with 2 levels with Scratch. In the first level of our game of matching the color-changing ball and the rectangle, which we will do with the Scratch program, there will be a rectangle that we can move left and right with the arrow keys. The color name will be written inside the rectangle. Colorful balls will come from the upper part of the stage. If the color name in the rectangle and the colored ball are the same, hit the ball and your number of Greetings will increase by one. If not, your remaining health will decrease by one. When your greeting number is 5, you will pass to level 2. In order to make the game a little more difficult at level 2, the color name in the rectangle and the color of the rectangle will be different. But the user will decide whether or not to touch the ball based on the color name. The rectangle color here is made so to force the user. Let's come to the code descriptions of the game; By adding a new sprite, we are adding ...

Making Mole Hunting Game with Scratch

 We will make an example of a mole hunting game with the Scratch program. The rules of the Mole Hunting Game Example that we will do with the Scratch program; There are 7 moles in 20 seconds. These moles come out of their nests and you have to hit them with a hammer. Each mole has 3 lives. If you hit a mole with a hammer 3 times, you will hunt it. You need to hunt 7 moles for 20 seconds to win the game. You gain 1 point for each hit. First of all, we draw and prepare our scene for the mole hunting game. We draw 2 different rectangles using the rectangle tool with yellow and green colors. Then we draw the molehills using the ellipse tool with turquoise color.   Let's come to the drawing of the hammer that we will use in the game, you can find it ready on the internet and use it, or you can draw it yourself like me. We use the rectangle tool when drawing the hammer. Its center point should be as in the image below. Then we right-click on our tow's disguise and say "copy a co...

Blinking Multiple Leds (Black Lightning) - With Mblock

 Before this application, we had blinked a single led. In this application, together with the Mblock program, we will make more than one led blinking, in other words, black lightning. The list of materials that our program will need in our led circuit before proceeding to the codes: 1-Arduino Uno 2-BreadBoard 3-7 LEDs 4- 7 pieces of 220Ω Resistor 5-Jumper Cables We need supplies. We add a 220 ohm resistor to the long leg of the LEDs we add to our breadboard. We connect one leg of the resistor with a jumper cable, starting from the digital pin 2 of our ardunio uno material, to the 8th pin. We connect the short leg of the LED to the GND (negative) terminal of the Ardunio Uno with a jumper cable. However, since there are 3 GND terminals on our arduino uno board, we connect the jumper cables that we connect to the short leg of the leds to the + or - terminals at the bottom of our breadboard. The cables must be aligned, we can connect the cables horizontally in the + or - ...