Skip to main content

Posts

Showing posts from February, 2022

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. After addi