• 1x Arduino
• 1x 16x2 LCD Display
• 1x Ultrasonic Sensor HC-SR04
• 2x Touch switch (buttons)
• 1x buzzer
• 1x Protoboard
Operation: It will be a distance meter for car, it will have 2 buttons (cm and in).
When connecting the Arduino, the distance in cm must be reported by pressing the button in
informs the distance in inches by pressing the cm button to inform the distance
in cm. If the distance is> 100cm does not mute the buzzer if it is between 100cm and
60cm whistles slowly, between 60cm and 45cm in average shape and 45cm to 4cm in
Please help me, it's for an important job.Please help me, it's for an important job.
I see you also have posted this in "Gigs and Collaborations"
If YOU want the job, then YOU have to do the work.
Post what you have done so far.
Safety is indeed important, so rather than cobble together a backup sensor, buy one. Here is a selection (https://www.amazon.com/slp/backup-sensors/urkvw5rwpzxx7n9).
I found this on the internet and it is similar but I do not know how to put the two touch keys
// Program: Distance meter with HC-SR04
// Author: Arduino e Cia
#include <Ultrasonic.h> // Loads the Ultrasonic library
#include <LiquidCrystal.h> // Load the LCD library
// Defines the Arduino pin to be used with the sensor Trigger Pin
#define PINO_TRIGGER 13
// Defines the Arduino pin to be used with the Echo pin of the sensor
#define PINO_ECHO 10
// Initializes the ultrasonic sensor
Ultrasonic ultrasonic (PINO_TRIGGER, PINO_ECHO);
// Defines the pins that will be connected to the LCD
LiquidCrystal lcd (12, 11, 5, 4, 3, 2);
void setup ()
Serial.begin (9600); // Initialize the serial
lcd.begin (16.2); // Initialize LCD
lcd.clear (); // Clean LCD
void loop ()
float cmMsec, inMsec;
// Le sensor data, with signal return time
long microsec = ultrasonic.timing ();
// Calculate distance in centimeters
cmMsec = ultrasonic.convert (microsec, Ultrasonic :: CM);
// Calculate the distance in inches
inMsec = ultrasonic.convert (microsec, Ultrasonic :: IN);
// Displays the data, in centimeters, on the LCD and Serial
lcd.print ("Cent .:");
// Displays the data, in inches, on the LCD and Serial
Serial.print (", Pol.:");
Use code tags when posting code ("</>" button), as described in "How to use this forum".
Follow one or more of the many Arduino on line tutorials to add buttons.