Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 153 - 2615_KEC
P. 153

    ∑  For the Ultrasonic Sensor:

                                   o  Use the sonar block in MakeCode to measure the distance.

                                   o  Set a threshold (e.g., 10 cm) for detecting an object.
                                  ∑  For the Servo Motor:

                                   o  Use the servo write pin block for the 180° servo to set the angle of the servo.

                                   o   For the 360° continuous servo, use the servo write speed block to set the speed
                                      and direction of the motor:

                                            Set a positive value to rotate clockwise.

                                            Set a negative value to rotate counterclockwise.

                          REVISIT

                       ▶   The Internet of Things (IoT) refers to a network of interconnected devices that can communicate with each other
                         and exchange data over the internet.
                       ▶  Wearable IoT devices collect and analyse real-time data to improve health, fitness and convenience.
                       ▶   Bluetooth is a wireless technology standard used for exchange data between devices over short distances, using
                         short-wavelength UHF radio waves.
                       ▶  A servo motor is a specialised motor used for precise control of angular position, velocity and acceleration.
                       ▶  The Micro:bit is a versatile microcontroller that can be used to control servo motors.
                       ▶  A breadboard is a tool used to prototype electronic circuits without the need for soldering.
                       ▶  Jumper wires are used to make connections between the breadboard, components and the Micro:bit.
                       ▶   Ultrasonic sensors are devices that use high-frequency sound waves to measure distance, detect objects and
                         sense movement.

                                                                                     IoT and Smart Motions with Micro:bit  151

| 148 149 150 151 152 153 154 155 156 157 158 |