COMMERCIAL DESIGN AND SIMULATION OF AUTOMATED HAND SANITIZER CIRCUIT ON TINKER CAD
ฝัง
- เผยแพร่เมื่อ 27 ก.ค. 2020
- #Detailed Description of Circuit
#Save Sanitizer Dispensing Action
#Timer Based Design
#List of Material Required for Assembly of Circuit
#Automatic Dispenser Circuit
#Real Time Simulation
Sir we want the code please post today
Sir can you please share the code
without aurdino ane timer hand sanitizer machine ..
hand sanitizer machine circuit diagram with diagram banao na ...
The whole circuit is in video and its aurdino based
Sir can you share the code
Sir code?
I will post the code
It's urgent for project submission
Ya sure 👍
Where are you uploading the code sir
In comment section
Send me ur email
const int echo=10;
const int trig=9;
const int led=7;
const int motor=4;
// defining variables
long duration;
int distance;
void setup()
{
pinMode(trig, OUTPUT); // Sets the trigPin as an Output
pinMode(echo, INPUT);
pinMode(led,OUTPUT);
pinMode(motor,OUTPUT);
Serial.begin(9600); // Starts the serial communication
}
void loop()
{
// Clears the trigPin
digitalWrite(trig, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trig, HIGH);
delayMicroseconds(10);
digitalWrite(trig, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
duration = pulseIn(echo, HIGH);
// Calculating the distance
distance= duration*0.034/2;
// Prints the distance on the Serial Monitor
if(distance>=170)
{
digitalWrite(led,HIGH);
digitalWrite(motor,HIGH);
Serial.print(distance);
delay(20000);
digitalWrite(led,LOW);
digitalWrite(motor,LOW);
delay(20000);
}
else
{
digitalWrite(led,LOW);
digitalWrite(motor,LOW);
delay(500);
}
}