External Sensor with ESP32
Hello everyone, I'm back!! This week I'll explain about using an external sensor with ESP32. For this project, I'll be using an ultrasonic sensor. The sensor looks like this: This sensor uses sonar to determine the distance of an object to the sensor. This is how the sensor works: 1. The ultrasound transmitter (trig pin) will emit a high-frequency sound (40 kHz) 2. If the sound finds an object, it will bounce back to the sensor. 3. The ultrasound receiver (echo pin) receives the reflected sound. cr: randomnerdtutorials Basically, the sensor sends sound waves and receives the echo. But how could we know its distance? We can calculate the distance to an object by using this formula: distance to an object = ((speed of sound in the air)*time)/2 Now, let's start experimenting with the sensor! First, prepare the components needed: 1. ESP32 2. Ultrasonic sensor 3. Breadboard 4. Male-to-male jumpers 5. Micro USB 6. Laptop/PC You also need to install the software needed. You can...