|
|
Arduino_UNO_R3 |
x 1 | |
|
CUSA-T80-12-2600-THCUI DEVICES
|
x 1 | |
|
CEM-14R06CTCUI DEVICES
|
x 1 |
|
arduino IDEArduino
|
SPECIALIZED SPECTACLES WITH ARDUINO UNO
#define trigPin 13
#define echoPin 12
#define motor 7
#define buzzer 6
void setup()
{
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(motor, OUTPUT);
pinMode(buzzer,OUTPUT);
}
void loop()
{
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(15);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (100/2);
if (distance < 100) // This is where checking the distance you can change the value
{
digitalWrite(motor,HIGH); // When the the distance below 100cm
digitalWrite(buzzer,HIGH);
} else
{
digitalWrite(motor,LOW); // when greater than 100cm
digitalWrite(buzzer,LOW);
} delay(500);
}
#define trigPin 13
#define echoPin 12
#define motor 7
#define buzzer 6
void setup()
{
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(motor, OUTPUT);
pinMode(buzzer,OUTPUT);
}
void loop()
{
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(15);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (100/2);
if (distance < 100) // This is where checking the distance you can change the value
{
digitalWrite(motor,HIGH); // When the the distance below 100cm
digitalWrite(buzzer,HIGH);
} else
{
digitalWrite(motor,LOW); // when greater than 100cm
digitalWrite(buzzer,LOW);
} delay(500);
}
SPECIALIZED SPECTACLES WITH ARDUINO UNO
Attribution-NonCommercial (CC BY-NC) License
Read More⇒
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by santhosh reddy
-
-
ARPS-2 – Arduino-Compatible Robot Project Shield for Arduino UNO
1340 0 4 -
-
A Compact Charging Breakout Board For Waveshare ESP32-C3
1868 3 7 -
AI-driven LoRa & LLM-enabled Kiosk & Food Delivery System
1860 2 0 -
-
-
-
ESP32-C3 BLE Keyboard - Battery Powered with USB-C Charging
2038 0 1 -







