diff --git a/Arduino/Self_Stabalising_Platform (Labelled).fzz b/Arduino/Self_Stabalising_Platform (Labelled).fzz new file mode 100644 index 0000000..d759647 Binary files /dev/null and b/Arduino/Self_Stabalising_Platform (Labelled).fzz differ diff --git a/Arduino/garage_door_updated (Labelled).fzz b/Arduino/garage_door_updated (Labelled).fzz new file mode 100644 index 0000000..aa853c7 Binary files /dev/null and b/Arduino/garage_door_updated (Labelled).fzz differ diff --git a/Self Stabilization Platform b/Self Stabilization Platform new file mode 100644 index 0000000..15fd03a --- /dev/null +++ b/Self Stabilization Platform @@ -0,0 +1 @@ +This is the complete diff --git a/code of Self Stabalization b/code of Self Stabalization new file mode 100644 index 0000000..34f6412 --- /dev/null +++ b/code of Self Stabalization @@ -0,0 +1,58 @@ +#include + +#include + +#include + +Servo sg90; + +int servo_pin = 2; + +MPU6050 sensor ; + +int16_t ax, ay, az ; + +int16_t gx, gy, gz ; + +void setup ( ) + +{ + +sg90.attach ( servo_pin ); + +Wire.begin ( ); + +Serial.begin (9600); + +Serial.println ( "Initializing the sensor" ); + +sensor.initialize ( ); + +Serial.println (sensor.testConnection ( ) ? "Successfully Connected" : "Connection failed"); + +delay (1000); + +Serial.println ( "Taking Values from the sensor" ); + +delay (1000); + +} + + + + +void loop ( ) + +{ + +sensor.getMotion6 (&ax, &ay, &az, &gx, &gy, &gz); + +ax = map (ax, -17000, 17000, 0, 180) ; + +Serial.println (ax); + +sg90.write (ax); + +delay (200); + +}