flow chart for the code , programming homework help
flow chart for the code , programming homework help
I want flow chart of this code and explain the flow chart .
This code of automatic car shelter with motion sensor ..
#include <Servo.h>
#define buzzer 3
#define motion 4
Servo myservo; // create servo object to control a servo
char recv=0;
boolean isclosed= false;
void setup(){
myservo.attach(9); // attaches the servo on pin 9 to the servo object
Serial.begin(9600);
delay(100);
myservo.write(147);
delay(100);
pinMode(motion,INPUT);
pinMode(buzzer,OUTPUT);
digitalWrite(buzzer,LOW);
}
void loop(){
if(Serial.available()){
recv=Serial.read();
if(recv==’o’){
isclosed= false;
myservo.write(147);
delay(500);}
if(recv==’c’){
isclosed= true;
myservo.write(24);
delay(5000);}
recv=0;
}
if(isclosed){
if(digitalRead(motion)==HIGH){
digitalWrite(buzzer,HIGH);
delay(5000);
digitalWrite(buzzer,LOW);
}
}
}
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


