Arduino Nano innovation for the visually impaired: smart blind stick-

  Рет қаралды 1,115

Preethi J

Preethi J

Күн бұрын

This project describes the IOT project for smart blind stick using Arduino Nano
// defines pins numbers
const int trigPin = 9;
const int echoPin = 10;
const int buzzer = 11;
const int ledPin = 13;
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 microseconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance = duration * 0.034 / 2;
safetyDistance = distance;
if (safetyDistance is lesser than or equal to 5)
{
digitalWrite(buzzer, HIGH);
digitalWrite(ledPin, HIGH);
}
else {
digitalWrite(buzzer, LOW);
digitalWrite(ledPin, LOW);
}
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
}

Пікірлер
The Best 20 Arduino Projects of the year 2024!
14:59
ToP Projects Compilation
Рет қаралды 92 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 42 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 44 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 26 МЛН
Effective Ways To Detect People With Common Sensors
7:43
Core Electronics
Рет қаралды 92 М.
I Made an Electronic Chessboard Without Turns
14:32
From Scratch
Рет қаралды 985 М.
Building an Electric Bike Without Electronics
13:50
Tom Stanton
Рет қаралды 699 М.
Ultimate Guide to Arduino Nano: Every Model Reviewed & Compared!
20:07
I Built a 4 Axis 3D Printer Unlike Anything You’ve Seen
7:50
Joshua Bird
Рет қаралды 365 М.
ESP32 CAM - 10 Dollar Camera for IoT Projects
29:39
DroneBot Workshop
Рет қаралды 799 М.
Tutorial-8:Failure of perceptron model in Telugu
15:31
Algorithm Avenue
Рет қаралды 23
Try these 16 Brilliant ESP32 projects!!!
11:18
ToP Projects Compilation
Рет қаралды 614 М.