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
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
Build Your Own Gps Tracking System using Arduino
Ultrasonic Sensor as a Counter with Arduino
OTP Based Door Lock Using Arduino And SIM800L
How To Make RFID & Keypad Based Door Lock
Esp32 Cam Based Face Unlock
IoT Based Patient Health Monitoring System Using Blynk App
MLX90614 Non-Contact Infrared Thermometer With Arduino
ESP32 Led Blink With Push Button
Smart Street Light Using Arduino
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