Project showcase
Parking Sensor with Arduino

Parking Sensor with Arduino © LGPL

This parking sensor with Arduino is an easy project.

  • 45,761 views
  • 14 comments
  • 47 respects

Components and supplies

Apps and online services

About this project

This easy Arduino project makes a parking sensor.

#include <Ultrasonic.h> 
Ultrasonic ultrasonic(6,5); 
// pin 6 trig , pin 5 echo
const int buzzer = 7; 
void setup(){ 
pinMode(buzzer,OUTPUT); // pin buzzer
} 
void loop(){ 
int dist = ultrasonic.Ranging(CM); 
if (dist < 100) { distance
 tone(buzzer,1000); 
    delay(40); 
  noTone(buzzer); 
    delay(dist*4); 
  } 
delay(100);  
}  

Code

hardwareC/C++
// 6 trig , 5 echo
#include <Ultrasonic.h>
Ultrasonic ultrasonic(6,5);// 6 trig , 5 echo


const int buzzer = 7; // pin buzzer

void setup(){
 pinMode(buzzer,OUTPUT);

}

void loop(){
 int dist = ultrasonic.Ranging(CM);
if (dist < 100) {
  tone(buzzer,1000);
     delay(40);
   noTone(buzzer);
     delay(dist*4);
   }
 delay(100); 
} 

Schematics

hardware
Untitled sketch bb2 fwdnejua03

Comments

Similar projects you might like

Parking Radar Sensor

Project tutorial by SurtrTech

  • 21,159 views
  • 12 comments
  • 65 respects

How to Make FLEX Sensor at Home | DIY Flex Sensor

Project tutorial by Tech Nuttiez

  • 1,401 views
  • 1 comment
  • 10 respects

How To Use DS18B20 Water Proof Temperature Sensor

Project showcase by IoTBoys

  • 197,242 views
  • 29 comments
  • 40 respects

Ultrasonic Sensor with Alarm, LCD and Temperature

Project tutorial by MichDragstar

  • 37,491 views
  • 11 comments
  • 40 respects

IOT - Smart Jar Using ESP8266, Arduino and Ultrasonic Sensor

Project tutorial by Team Smazee

  • 18,130 views
  • 5 comments
  • 21 respects

Garage Parking Stop Light

Project showcase by Rich Noordam

  • 6,630 views
  • 1 comment
  • 14 respects
Add projectSign up / Login