Back Posture Correction Device

Now no more back pain! Get alerts whenever you maintain bad posture.

BeginnerFull instructions provided24 hours1,044
Back Posture Correction Device

Things used in this project

Story

Read more

Code

Energia Code for back posture correction devic

Arduino
Alerts the user through buzzer sound when wrong posture is maintained for longer time
int x_out=A3, y_out=A4;
int LED1 = 8, LED2 = 10; 
int BUZZER = 9;

void setup() {
Serial.begin(9600);
pinMode(BUZZER, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
digitalWrite(LED1,LOW);
digitalWrite(LED2,LOW);
digitalWrite(BUZZER,LOW);
}

void loop() {
int x_adc_value,y_adc_value;
x_adc_value = analogRead(x_out);
y_adc_value = analogRead(y_out);
int x_max=450,x_min=417;   			//x-axis reading in correct posture
int y_max=470,y_min=390;			//y-axis reading in correct posture

if((x_adc_value<x_max)&&(x_adc_value>x_min)&&(y_adc_value<y_max)&&(y_adc_value>y_min)){       
Serial.print("Posture Is Correct");
Serial.print("\n\n");
digitalWrite(LED1,HIGH);
digitalWrite(LED2,LOW);
digitalWrite(BUZZER,LOW);
}
else 
{
Serial.print("Incorrect Posture");
Serial.print("\n\n");
digitalWrite(LED1,LOW);
digitalWrite(LED2,HIGH);
digitalWrite(BUZZER, HIGH);

}


}

Credits

Dr. Umesh Dutta
42 projects • 60 followers
Working as Director of Innovation Centre at Manav Rachna, India. I am into development for the last 12 years.
Contact
Texas Instruments University Program
91 projects • 120 followers
TI helps students discover what's possible to engineer their future.
Contact
Energia
34 projects • 26 followers
Founder of @energiaproject
Contact
Ayaam Choudhary
0 projects • 0 followers
Beginner to Arduino Trying my best to improve and do more exciting Projects
Contact
Saksham Srivastav
0 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.