Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Digital Range Finder
Just Do Electronics
May 05, 2020
Circuit Diagram :-
Code :-
//Prateek //www.prateeks.in #include
#include
#include
#include
#define trigPin 12 #define echoPin 11 #define OLED_RESET 4 Adafruit_SSD1306 display(OLED_RESET); void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); } void loop() { float duration; float distance_cm; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance_cm = (duration/2) / 29.1; display.setCursor(30,0); //oled display display.setTextSize(1); display.setTextColor(WHITE); display.println("Range Finder"); display.setCursor(10,20); //oled display display.setTextSize(2); display.setTextColor(WHITE); display.println(distance_cm); display.setCursor(90,20); display.setTextSize(2); display.println("cm"); delay(500); display.clearDisplay(); Serial.println(distance_cm); }
Photo
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
How to Make a Conveyor Belt System | Counter Machine
Smart Street Light Using Arduino
IoT Based Patient Health Monitoring System Using Blynk App
Esp32 Cam Based Face Unlock
ESP32 Led Blink With Push Button
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
How To Make RFID & Keypad Based Door Lock
ESP32 And Fingerprint Sensor Based Biometric Door Lock Security System
IoT Weight Scale using Load Cell HX711 & ESP8266
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments