2: Circuit with Microcontroller

Building a Simple Traffic Light System

2: Circuit with Microcontroller

Add micro:bit:

2: Circuit with Microcontroller

Add breadboard:

2: Circuit with Microcontroller

Add LEDs and resistors:

2: Circuit with Microcontroller

Connecting components on the breadboard:

2: Circuit with Microcontroller

Wiring cathodes to the ground pin:

2: Circuit with Microcontroller

Wiring pins:

2: Circuit with Microcontroller

Now that you have finished preparing the components

2: Circuit with Microcontroller

Write the following code and start the simulation.

2: Circuit with Microcontroller

Building a Detection Alarm System

2: Circuit with Microcontroller

Add a piezo buzzer to the workplane.

2: Circuit with Microcontroller

Add PIR Sensor:

2: Circuit with Microcontroller

Connect the ground end of the PIR Sensor to the GND pin of the micro:bit.

2: Circuit with Microcontroller

Connect PIR:

2: Circuit with Microcontroller

Now that you have finished with the connections, you can add the following code and test it.

2: Circuit with Microcontroller

Which component will you use to easily connect more electronic components?

Can you identify the problem with these connections?

Why do we use the resistors in the following electronic circuit?

2: Circuit with Microcontroller

What is the main difference between a distance sensor and a PIR sensor?

How many electronic components can you connect to the ground pin of the micro:bit board?

In all micro:bit projects, you define a function named on_forever. Explain how you use it and why it is required.

in the traffic light circuit

2: Circuit with Microcontroller

Examine the following circuit and its code carefully and find the problem. What do you need to do to fix it?