nithin
Created September 4, 2024

Gesture-Driven IoT Health Alert System for Paralysis Patient

A motion-activated IoT system allowing paralysis patients to send health alerts and messages with simple hand gestures.

18
Gesture-Driven IoT Health Alert System for Paralysis Patient

Things used in this project

Story

Read more

Code

Gesture-Driven IoT Health Alert System for Paralysis Patients

C/C++
This code uses an MPU6050 sensor to detect hand motion, triggering alerts based on the direction of movement.
#include <Wire.h>
#include <MPU6050.h>

MPU6050 mpu;

void setup() {
    Wire.begin();
    Serial.begin(9600);
    mpu.initialize();
}

void loop() {
    int16_t ax, ay, az;
    int16_t gx, gy, gz;
    
    mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
    
    if (ax > THRESHOLD_X) {
        Serial.println("Left motion detected");
    } else if (ax < -THRESHOLD_X) {
        Serial.println("Right motion detected");
    } else if (ay > THRESHOLD_Y) {
        Serial.println("Up motion detected");
    } else if (ay < -THRESHOLD_Y) {
        Serial.println("Down motion detected");
    }
    delay(100);
}

Credits

nithin

nithin

1 project • 1 follower

Comments