Measure the distance between an obstacle and the HC-SR04 sensor with Micro:bit

Поділитися
Вставка
  • Опубліковано 4 кві 2021
  • Micro:bit is a small, low-cost microcontroller board that was developed by the Micro:bit Educational Foundation for use in computer education. It is designed to be easy to use and accessible to a wide range of users, including children and beginners. The Micro:bit board measures about 4cm by 5cm and features a 25-pin edge connector, a 5×5 LED matrix, two programmable buttons, an accelerometer, a compass, a Bluetooth Low Energy (BLE) module, and a USB connector.
    The HC-SR04 is an ultrasonic distance sensor that uses sound waves to determine the distance to an object. It is a low-cost, easy-to-use sensor that can be used in a wide range of applications. The sensor has four pins: VCC, GND, Trig and Echo.
    The HC-SR04 ultrasonic sensor can be used to measure the distance between an obstacle and the sensor using the Micro:bit. The sensor uses ultrasound to measure the distance, by sending out a sound wave and measuring the time it takes for the sound wave to bounce back.
    To use the HC-SR04 sensor with the Micro:bit, you will need to connect the sensor to the Micro:bit‘s pins. The sensor has four pins: VCC, GND, Trig and Echo. VCC should be connected to 3V on the Micro:bit, GND to GND, Trig to one of the digital output pins (such as pin 0 or pin 1) and Echo to one of the digital input pins (such as pin 2 or pin 3).
    For more details you can see this article: www.robotique.tech/robotics/m...

КОМЕНТАРІ •