Project for disabled people

 Circuit diagram:


Arduino code:


int flexs = A0; // flex sensor is connected with analog pin A0

int data = 0; 

 

int led = 13; 

void setup()

{

  Serial.begin(9600); 

  pinMode(flexs, INPUT);

pinMode(led, OUTPUT);   

}

 

void loop()

{

  data = analogRead(flexs); 

  Serial.println(data); 

  

  if( data <= 200) 

  {

   digitalWrite(led, HIGH);  

  }

  

    if( data > 200) 

  {

   digitalWrite(led, LOW);  

  }

  delay(1000); 

}

Post a Comment

3 Comments