Page 142 - KEC Khaitan C6 Flipbook
P. 142
∑ Echo is connected to Pin 1, but since it sends a 5V signal, we use special resistors to make it
safe for the Micro:bit.
How It Works:
∑ The Micro:bit sends a signal to the Trig pin.
∑ The sensor then sends out an ultrasonic sound wave.
∑ The wave bounces off an object and comes back to the Echo pin.
∑ The Micro:bit measures the time it takes for the wave to return.
∑ Using the speed of sound, the Micro:bit calculates the distance to the object.
WHAT ARE MOTORS?
In IoT (Internet of Things), motors are used to control movement in smart devices like automated
doors, robotic arms, and smart vehicles. The Micro:bit can control different types of motors, such
as DC motors, servo motors, and stepper motors, by sending signals to them.
CONNECTING A MOTOR TO THE MICRO:BIT
Components:
∑ Micro:bit ∑ NPN Transistor
∑ DC Motor ∑ Alligator Wires
∑ Power Source (Battery/USB)
Steps:
1. Circuit Setup:
∑ Connect GND of Micro:bit to ground.
∑ Connect Pin 1 (P1) of Micro:bit to the base of the NPN transistor.
∑ Connect collector of transistor to negative terminal of DC motor.
∑ Connect positive terminal of DC motor to positive terminal of the power source.
140 Premium Edition-VI

