diff --git a/examples/IMU_Zero/IMU_Zero.ino b/examples/IMU_Zero/IMU_Zero.ino index 7bf2bf9..9364ef7 100755 --- a/examples/IMU_Zero/IMU_Zero.ino +++ b/examples/IMU_Zero/IMU_Zero.ino @@ -71,6 +71,7 @@ void setup() { } void loop() { + //Write your code here } /*Initializate function*/ @@ -156,7 +157,8 @@ void PullBracketsOut() { if (LowValue[i] >= Target[i]) { Done = false; NextLowOffset[i] = LowOffset[i] - 1000; - } else { + } + else { NextLowOffset[i] = LowOffset[i]; } } @@ -167,7 +169,8 @@ void PullBracketsOut() { if (HighValue[i] <= Target[i]) { Done = false; NextHighOffset[i] = HighOffset[i] + 1000; - } else { + } + else { NextHighOffset[i] = HighOffset[i]; } } @@ -192,7 +195,8 @@ void PullBracketsIn() { StillWorking = false; if (AllBracketsNarrow && (N == NFast)) { SetAveraging(NSlow); - } else { + } + else { AllBracketsNarrow = true; } for (int i = 0; i <= 5; i++) { @@ -239,8 +243,9 @@ void GetSmoothed() { for (i = 1; i <= N; i++) { mpu.getMotion6( & RawValue[iAx], & RawValue[iAy], & RawValue[iAz], & RawValue[iGx], & RawValue[iGy], & RawValue[iGz]); delayMicroseconds(usDelay); - for (int j = 0; j <= 5; j++) + for (int j = 0; j <= 5; j++){ Sums[j] = Sums[j] + RawValue[j]; + } } for (i = 0; i <= 5; i++) { Smoothed[i] = (Sums[i] + N / 2) / N; diff --git a/examples/MCU_Powercycle_DMP6/MCU_Powercycle_DMP6.ino b/examples/MCU_Powercycle_DMP6/MCU_Powercycle_DMP6.ino index 54f0e3e..f9d9df6 100644 --- a/examples/MCU_Powercycle_DMP6/MCU_Powercycle_DMP6.ino +++ b/examples/MCU_Powercycle_DMP6/MCU_Powercycle_DMP6.ino @@ -5,7 +5,7 @@ when the MCU gas been reset or powercycled but MPU6050 has not. This example is designed for the LGT8F328. The MCU will enter deep sleep for 1 second, erasing - the RAM, causing the MCU to restart on wakeup. + the RAM, causing the MCU to restart on wakeup. Find the full MPU6050 library docummentation here: https://github.com/ElectronicCats/mpu6050/wiki @@ -100,7 +100,6 @@ void setup() { on the MPU6050. */ mpu.setMotionDetectionDuration(1); - startTime = millis(); } diff --git a/examples/MPU6050_DMP6/MPU6050_DMP6.ino b/examples/MPU6050_DMP6/MPU6050_DMP6.ino index 80c4eac..5bf3439 100644 --- a/examples/MPU6050_DMP6/MPU6050_DMP6.ino +++ b/examples/MPU6050_DMP6/MPU6050_DMP6.ino @@ -1,30 +1,34 @@ /* - MPU6050 DMP6 + MPU6050 DMP6 - Digital Motion Processor or DMP performs complex motion processing tasks. - - Fuses the data from the accel, gyro and extarnal magnetometer if applies, - compesating individual sensor noise and errors. - - Detect specific types of motion without the need to continuosly monitor - raw sensor data with a microcontroller. - - Reduce workload on the microprocessor. - - Output processed data such as quaternions, Euler angles, and gravity vectors. + Digital Motion Processor or DMP performs complex motion processing tasks. + - Fuses the data from the accel, gyro and extarnal magnetometer if applies, + compesating individual sensor noise and errors. + - Detect specific types of motion without the need to continuosly monitor + raw sensor data with a microcontroller. + - Reduce workload on the microprocessor. + - Output processed data such as quaternions, Euler angles, and gravity vectors. - The code incluces an auto calibration and offset generator tasks. Different - output formats available. + The code incluces an auto calibration and offset generator tasks. Different + output formats available. - This code is compatible with teapot propject by using the teapot output format. + This code is compatible with teapot propject by using the teapot output format. - Circuit: In addition to connection 3.3v, GND, SDA, and SCL, this sketch - depends on the MPU6050's INT pin being connected to the Arduino's - external interrupt #0 pin. + Circuit: In addition to connection 3.3v, GND, SDA, and SCL, this sketch + depends on the MPU6050's INT pin being connected to the Arduino's + external interrupt #0 pin. + + Teapot processing example may be broken due FIFO structure change. if using DMP + 6.12 firmware version. - Find the full MPU6050 library docummentation here: - https://github.com/ElectronicCats/mpu6050/wiki + Find the full MPU6050 library docummentation here: + https://github.com/ElectronicCats/mpu6050/wiki */ #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" +//#include "MPU6050_6Axis_MotionApps612.h" // Uncomment this library to work with DMP 6.12 and comment the above library. /* MPU6050 default I2C address is 0x68*/ MPU6050 mpu; @@ -51,12 +55,12 @@ refernce frame. Yaw is relative if there is no magnetometer present. - Use "OUTPUT_TEAPOT" for output that matches the InvenSense teapot demo. -------------------------------------------------------------------------------------------------------------------------------*/ -//#define OUTPUT_READABLE_YAWPITCHROLL +#define OUTPUT_READABLE_YAWPITCHROLL //#define OUTPUT_READABLE_QUATERNION //#define OUTPUT_READABLE_EULER //#define OUTPUT_READABLE_REALACCEL //#define OUTPUT_READABLE_WORLDACCEL -#define OUTPUT_TEAPOT +//#define OUTPUT_TEAPOT int const INTERRUPT_PIN = 2; // Define the interruption #0 pin bool blinkState; @@ -66,12 +70,12 @@ bool DMPReady = false; // Set true if DMP init was successful uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU uint8_t devStatus; // Return status after each device operation (0 = success, !0 = error) uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) -uint16_t FIFOCount; // Count of all bytes currently in FIFO uint8_t FIFOBuffer[64]; // FIFO storage buffer /*---Orientation/Motion Variables---*/ Quaternion q; // [w, x, y, z] Quaternion container VectorInt16 aa; // [x, y, z] Accel sensor measurements +VectorInt16 gy; // [x, y, z] Gyro sensor measurements VectorInt16 aaReal; // [x, y, z] Gravity-free accel sensor measurements VectorInt16 aaWorld; // [x, y, z] World-frame accel sensor measurements VectorFloat gravity; // [x, y, z] Gravity vector @@ -79,12 +83,12 @@ float euler[3]; // [psi, theta, phi] Euler angle container float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector /*-Packet structure for InvenSense teapot demo-*/ -uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' }; +uint8_t teapotPacket[14] = { '$', 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0x00, '\r', '\n' }; /*------Interrupt detection routine------*/ volatile bool MPUInterrupt = false; // Indicates whether MPU6050 interrupt pin has gone high void DMPDataReady() { - MPUInterrupt = true; + MPUInterrupt = true; } void setup() { @@ -109,7 +113,7 @@ void setup() { Serial.println("MPU6050 connection failed"); while(true); } - else { + else { Serial.println("MPU6050 connection successful"); } @@ -127,6 +131,8 @@ void setup() { mpu.setXGyroOffset(0); mpu.setYGyroOffset(0); mpu.setZGyroOffset(0); + mpu.setXAccelOffset(0); + mpu.setYAccelOffset(0); mpu.setZAccelOffset(0); /* Making sure it worked (returns 0 if so) */ diff --git a/examples/MPU6050_DMP6/Processing/MPUTeapot/MPUTeapot.pde b/examples/MPU6050_DMP6/Processing/MPUTeapot/MPUTeapot.pde index 8a92c1b..a183dbc 100755 --- a/examples/MPU6050_DMP6/Processing/MPUTeapot/MPUTeapot.pde +++ b/examples/MPU6050_DMP6/Processing/MPUTeapot/MPUTeapot.pde @@ -1,8 +1,16 @@ /* - NOTE: ToxicLibs library is required. -1. Download from https://github.com/postspectacular/toxiclibs/releases -2. Extract into [userdir]/Documents/Processing/libraries (location may be different on Mac/Linux) -3. Restart Processing if needed + MPU Teapot example + + This code will display a airplane graphhics which will follow the MPU6050 movements. + + Use #define OUTPUT_TEAPOT output definition to make this code work. + + Define the serial port in the code below (line 45). Note: Close any other serial instance using the port. + + NOTE: ToxicLibs library is required. + 1. Download from https://github.com/postspectacular/toxiclibs/releases + 2. Extract into [userdir]/Documents/Processing/libraries (location may be different on Mac/Linux) + 3. Restart Processing if needed */ import processing.serial.*; diff --git a/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino b/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino index 6e1fea6..71849b8 100644 --- a/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino +++ b/examples/MPU6050_DMP6_ESPWiFi/MPU6050_DMP6_ESPWiFi.ino @@ -1,161 +1,119 @@ -/* ============================================ -I2Cdev device library code is placed under the MIT license -Copyright (c) 2012 Jeff Rowberg - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -=============================================== -*/ +/* + MPU6050 DMP6 ESPWiFi + + The board read quaternion data from the MPU6050 and sends Open Sound + Control messages. + + This example requires the WiFiManager and OSCMEssage libraries available here: + - https://github.com/tzapu/WiFiManager + - https://github.com/CNMAT/OSC + + Digital Motion Processor or DMP performs complex motion processing tasks. + - Fuses the data from the accel, gyro and extarnal magnetometer if applies, + compesating individual sensor noise and errors. + - Detect specific types of motion without the need to continuosly monitor + raw sensor data with a microcontroller. + - Reduce workload on the microprocessor. + - Output processed data such as quaternions, Euler angles, and gravity vectors. + + The code incluces an auto calibration and offset generator tasks. Different + output formats available. -/* This driver reads quaternion data from the MPU6060 and sends - Open Sound Control messages. - - GY-521 NodeMCU - MPU6050 devkit 1.0 - board Lolin Description - ======= ========== ==================================================== - VCC VU (5V USB) Not available on all boards so use 3.3V if needed. - GND G Ground - SCL D1 (GPIO05) I2C clock - SDA D2 (GPIO04) I2C data - XDA not connected - XCL not connected - AD0 not connected - INT D8 (GPIO15) Interrupt pin + This code is compatible with teapot propject by using the teapot output format. + + Circuit: In addition to connection 3.3v, GND, SDA, and SCL, this sketch + depends on the MPU6050's INT pin being connected to the board's + external interrupt #0 pin. + + Find the full MPU6050 library docummentation here: + https://github.com/ElectronicCats/mpu6050/wiki */ -#if defined(ESP8266) -#include +#if defined(ESP8266) +#include // Include this library if using an ESP8266 based board #else -#include +#include //Otherwise use the included WiFi library #endif + #include #include #include #include -#include //https://github.com/tzapu/WiFiManager +#include -// I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files -// for both classes must be in the include path of your project #include "I2Cdev.h" - #include "MPU6050_6Axis_MotionApps20.h" -//#include "MPU6050.h" // not necessary if using MotionApps include file - -// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation -// is used in I2Cdev.h -#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE - #include "Wire.h" -#endif -// class default I2C address is 0x68 -// specific I2C addresses may be passed as a parameter here -// AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board) -// AD0 high = 0x69 +/* MPU6050 default I2C address is 0x68*/ MPU6050 mpu; -//MPU6050 mpu(0x69); // <-- use for AD0 high - -/* ========================================================================= - NOTE: In addition to connection 5/3.3v, GND, SDA, and SCL, this sketch - depends on the MPU-6050's INT pin being connected to the ESP8266 GPIO15 - pin. - * ========================================================================= */ - -// MPU control/status vars -bool dmpReady = false; // set true if DMP init was successful -uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU -uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) -uint16_t packetSize; // expected DMP packet size (default is 42 bytes) -uint16_t fifoCount; // count of all bytes currently in FIFO -uint8_t fifoBuffer[64]; // FIFO storage buffer - -// orientation/motion vars -Quaternion q; // [w, x, y, z] quaternion container -VectorInt16 aa; // [x, y, z] accel sensor measurements -VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements -VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements -VectorFloat gravity; // [x, y, z] gravity vector - - -// uncomment "OUTPUT_READABLE_QUATERNION" if you want to see the actual -// quaternion components in a [w, x, y, z] format (not best for parsing -// on a remote host such as Processing or something though) -//#define OUTPUT_READABLE_QUATERNION +//MPU6050 mpu(0x69); //Use for AD0 high +//MPU6050 mpu(0x68, &Wire1); //Use for AD0 low, but 2nd Wire (TWI/I2C) object. -// uncomment "OUTPUT_READABLE_EULER" if you want to see Euler angles -// (in degrees) calculated from the quaternions coming from the FIFO. -// Note that Euler angles suffer from gimbal lock (for more info, see -// http://en.wikipedia.org/wiki/Gimbal_lock) -//#define OUTPUT_READABLE_EULER +/* OUTPUT FORMAT DEFINITION------------------------------------------------------------------------------------------- +- Use "OUTPUT_READABLE_QUATERNION" for quaternion commponents in [w, x, y, z] format. Quaternion do not +suffer from gimbal lock problem but is harder to parse or process efficiently on a remotehost or software +enviroments like Porcessing. -// uncomment "OUTPUT_READABLE_YAWPITCHROLL" if you want to see the yaw/ -// pitch/roll angles (in degrees) calculated from the quaternions coming -// from the FIFO. Note this also requires gravity vector calculations. -// Also note that yaw/pitch/roll angles suffer from gimbal lock (for -// more info, see: http://en.wikipedia.org/wiki/Gimbal_lock) -//#define OUTPUT_READABLE_YAWPITCHROLL +- Use "OUTPUT_READABLE_EULER" for Euler angles (in degrees) output, calculated from the quaternions coming +from the FIFO. EULER ANGLES SUFFER FROM GIMBAL LOCK PROBLEM. -// uncomment "OUTPUT_READABLE_REALACCEL" if you want to see acceleration -// components with gravity removed. This acceleration reference frame is -// not compensated for orientation, so +X is always +X according to the -// sensor, just without the effects of gravity. If you want acceleration -// compensated for orientation, us OUTPUT_READABLE_WORLDACCEL instead. -//#define OUTPUT_READABLE_REALACCEL +- Use "OUTPUT_READABLE_YAWPITCHROLL" for yaw/pitch/roll angles (in degrees) calculated from the quaternions +coming from the FIFO. THIS REQUIRES GRAVITY VECTOR CALCULATION. +YAW/PITCH/ROLL ANGLES SUFFER FROM GIMBAL LOCK PROBLEM. -// uncomment "OUTPUT_READABLE_WORLDACCEL" if you want to see acceleration -// components with gravity removed and adjusted for the world frame of -// reference (yaw is relative to initial orientation, since no magnetometer -// is present in this case). Could be quite handy in some cases. -//#define OUTPUT_READABLE_WORLDACCEL +- Use "OUTPUT_READABLE_REALACCEL" for acceleration components with gravity removed. The accel reference frame +is not compesated for orientation. +X will always be +X according to the sensor. -// uncomment "OUTPUT_TEAPOT_OSC" if you want output that matches the -// format used for the InvenSense teapot demo -#define OUTPUT_TEAPOT_OSC +- Use "OUTPUT_READABLE_WORLDACCEL" for acceleration components with gravity removed and adjusted for the world +refernce frame. Yaw is relative if there is no magnetometer present. +- Use "OUTPUT_TEAPOT_OSC" for output that matches the InvenSense teapot demo. +-------------------------------------------------------------------------------------------------------------------------------*/ +#define OUTPUT_TEAPOT_OSC +//#define OUTPUT_READABLE_YAWPITCHROLL +//#define OUTPUT_READABLE_QUATERNION +//#define OUTPUT_READABLE_EULER +//#define OUTPUT_READABLE_REALACCEL +//#define OUTPUT_READABLE_WORLDACCEL #ifdef OUTPUT_READABLE_EULER float euler[3]; // [psi, theta, phi] Euler angle container #endif #ifdef OUTPUT_READABLE_YAWPITCHROLL -float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector +float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector #endif -#define INTERRUPT_PIN 15 // use pin 15 on ESP8266 +#define INTERRUPT_PIN 15 //define the INT pin on your board -const char DEVICE_NAME[] = "mpu6050"; +/*---MPU6050 Control/Status Variables---*/ +bool DMPReady = false; // Set true if DMP init was successful +uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU +uint8_t devStatus; // Return status after each device operation (0 = success, !0 = error) +uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) +uint16_t FIFOCount; // Count of all bytes currently in FIFO +uint8_t FIFOBuffer[64]; // FIFO storage buffer + +/*---Orientation/Motion Variables---*/ +Quaternion q; // [w, x, y, z] Quaternion container +VectorInt16 aa; // [x, y, z] Accel sensor measurements +VectorInt16 aaReal; // [x, y, z] Gravity-free accel sensor measurements +VectorInt16 aaWorld; // [x, y, z] World-frame accel sensor measurements +VectorFloat gravity; // [x, y, z] Gravity vector -WiFiUDP Udp; // A UDP instance to let us send and receive packets over UDP -const IPAddress outIp(192, 168, 1, 11); // remote IP to receive OSC -const unsigned int outPort = 9999; // remote port to receive OSC +const char DEVICE_NAME[] = "mpu6050"; -// ================================================================ -// === INTERRUPT DETECTION ROUTINE === -// ================================================================ +WiFiUDP UDP; // A instance to let us send and receive packets over +const IPAddress outIp(192, 168, 1, 11); // Remote IP to receive OSC +const unsigned int outPort = 9999; // Remote port to receive OSC -volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high +/*------Interrupt detection routine------*/ +volatile bool MPUInterrupt = false; // Indicates whether MPU6050 interrupt pin has gone high void ICACHE_RAM_ATTR dmpDataReady() { - mpuInterrupt = true; + MPUInterrupt = true; } -void mpu_setup() -{ - // join I2C bus (I2Cdev library doesn't do this automatically) +void mpu_setup(){ #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE Wire.begin(); Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties @@ -163,208 +121,195 @@ void mpu_setup() Fastwire::setup(400, true); #endif - // initialize device + // Initialize device Serial.println(F("Initializing I2C devices...")); mpu.initialize(); pinMode(INTERRUPT_PIN, INPUT); - // verify connection - Serial.println(F("Testing device connections...")); - Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed")); + /*Verify connection*/ + Serial.println(F("Testing MPU6050 connection...")); + if(mpu.testConnection() == false){ + Serial.println("MPU6050 connection failed"); + while(true); + } + else { + Serial.println("MPU6050 connection successful"); + } - // load and configure the DMP + /* Initializate and configure the DMP*/ Serial.println(F("Initializing DMP...")); devStatus = mpu.dmpInitialize(); - // supply your own gyro offsets here, scaled for min sensitivity - mpu.setXGyroOffset(220); - mpu.setYGyroOffset(76); - mpu.setZGyroOffset(-85); - mpu.setZAccelOffset(1788); // 1688 factory default for my test chip + /* Supply your gyro offsets here, scaled for min sensitivity */ + mpu.setXGyroOffset(0); + mpu.setYGyroOffset(0); + mpu.setZGyroOffset(0); + mpu.setZAccelOffset(0); - // make sure it worked (returns 0 if so) + /* Making sure it worked (returns 0 if so) */ if (devStatus == 0) { - // turn on the DMP, now that it's ready - Serial.println(F("Enabling DMP...")); + mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + Serial.println(F("Enabling DMP...")); //Turning ON DMP mpu.setDMPEnabled(true); - // enable Arduino interrupt detection - Serial.println(F("Enabling interrupt detection (Arduino external interrupt 0)...")); - attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING); - mpuIntStatus = mpu.getIntStatus(); + /*Enable Arduino interrupt detection*/ + Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); + Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); + Serial.println(F(")...")); + attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), DMPDataReady, RISING); + MPUIntStatus = mpu.getIntStatus(); - // set our DMP Ready flag so the main loop() function knows it's okay to use it + /* Set the DMP Ready flag so the main loop() function knows it is okay to use it */ Serial.println(F("DMP ready! Waiting for first interrupt...")); - dmpReady = true; - - // get expected DMP packet size for later comparison - packetSize = mpu.dmpGetFIFOPacketSize(); - } else { - // ERROR! - // 1 = initial memory load failed - // 2 = DMP configuration updates failed - // (if it's going to break, usually the code will be 1) - Serial.print(F("DMP Initialization failed (code ")); + DMPReady = true; + packetSize = mpu.dmpGetFIFOPacketSize(); //Get expected DMP packet size for later comparison + } + else { + Serial.print(F("DMP Initialization failed (code ")); //Print the error code Serial.print(devStatus); Serial.println(F(")")); + // 1 = initial memory load failed + // 2 = DMP configuration updates failed } } -void setup(void) -{ - Serial.begin(115200); - Serial.println(F("\nOrientation Sensor OSC output")); Serial.println(); - - //WiFiManager - //Local intialization. Once its business is done, there is no need to keep it around - WiFiManager wifiManager; - //reset saved settings - //wifiManager.resetSettings(); - - //fetches ssid and pass from eeprom and tries to connect - //if it does not connect it starts an access point with the specified name - //and goes into a blocking loop awaiting configuration - wifiManager.autoConnect(DEVICE_NAME); - - Serial.print(F("WiFi connected! IP address: ")); - Serial.println(WiFi.localIP()); - - mpu_setup(); -} - void mpu_loop() { - // if programming failed, don't try to do anything - if (!dmpReady) return; - - // wait for MPU interrupt or extra packet(s) available - if (!mpuInterrupt && fifoCount < packetSize) return; + if (!DMPReady) return; // Stop the program if DMP programming fails. + if (!MPUInterrupt && FIFOCount < packetSize) return; // Wait for MPU interrupt or extra packet(s) available - // reset interrupt flag and get INT_STATUS byte - mpuInterrupt = false; - mpuIntStatus = mpu.getIntStatus(); + /*Reset interrupt flag and get INT_STATUS byte*/ + MPUInterrupt = false; + MPUIntStatus = mpu.getIntStatus(); - // get current FIFO count - fifoCount = mpu.getFIFOCount(); + FIFOCount = mpu.getFIFOCount(); // Get current FIFO count - // check for overflow (this should never happen unless our code is too inefficient) - if ((mpuIntStatus & 0x10) || fifoCount == 1024) { - // reset so we can continue cleanly - mpu.resetFIFO(); + /*Check for overflow (this should never happen unless our code is too inefficient)*/ + if ((MPUIntStatus & 0x10) || FIFOCount == 1024) { + mpu.resetFIFO(); //Reset so we can continue cleanly Serial.println(F("FIFO overflow!")); - - // otherwise, check for DMP data ready interrupt (this should happen frequently) - } else if (mpuIntStatus & 0x02) { - // wait for correct available data length, should be a VERY short wait - while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount(); - - // read a packet from FIFO - mpu.getFIFOBytes(fifoBuffer, packetSize); - + //*Otherwise, check for DMP data ready interrupt (this should happen frequently)*/ + } + else if (MPUIntStatus & 0x02) { + while (FIFOCount < packetSize) FIFOCount = mpu.getFIFOCount(); // Wait for correct available data length, should be a VERY short wait + mpu.getFIFOBytes(FIFOBuffer, packetSize); //Read a packet from FIFO // track FIFO count here in case there is > 1 packet available // (this lets us immediately read more without waiting for an interrupt) - fifoCount -= packetSize; - -#ifdef OUTPUT_READABLE_QUATERNION - // display quaternion values in easy matrix form: w x y z - mpu.dmpGetQuaternion(&q, fifoBuffer); - Serial.print("quat\t"); - Serial.print(q.w); - Serial.print("\t"); - Serial.print(q.x); - Serial.print("\t"); - Serial.print(q.y); - Serial.print("\t"); - Serial.println(q.z); -#endif + FIFOCount -= packetSize; + #ifdef OUTPUT_READABLE_QUATERNION + /* Display Quaternion values in easy matrix form: [w, x, y, z] */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + Serial.print("quat\t"); + Serial.print(q.w); + Serial.print("\t"); + Serial.print(q.x); + Serial.print("\t"); + Serial.print(q.y); + Serial.print("\t"); + Serial.println(q.z); + #endif -#ifdef OUTPUT_TEAPOT_OSC -#ifndef OUTPUT_READABLE_QUATERNION - // display quaternion values in easy matrix form: w x y z - mpu.dmpGetQuaternion(&q, fifoBuffer); -#endif - // Send OSC message - OSCMessage msg("/imuquat"); - msg.add((float)q.w); - msg.add((float)q.x); - msg.add((float)q.y); - msg.add((float)q.z); - - Udp.beginPacket(outIp, outPort); - msg.send(Udp); - Udp.endPacket(); - - msg.empty(); -#endif + #ifdef OUTPUT_TEAPOT_OSC + #ifndef OUTPUT_READABLE_QUATERNION + /* Display Quaternion values in easy matrix form: [w, x, y, z] */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + #endif + /*Send OSC message*/ + OSCMessage msg("/imuquat"); + msg.add((float)q.w); + msg.add((float)q.x); + msg.add((float)q.y); + msg.add((float)q.z); + + UDP.beginPacket(outIp, outPort); + msg.send(UDP); + UDP.endPacket(); + msg.empty(); + #endif -#ifdef OUTPUT_READABLE_EULER - // display Euler angles in degrees - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetEuler(euler, &q); - Serial.print("euler\t"); - Serial.print(euler[0] * 180/M_PI); - Serial.print("\t"); - Serial.print(euler[1] * 180/M_PI); - Serial.print("\t"); - Serial.println(euler[2] * 180/M_PI); -#endif + #ifdef OUTPUT_READABLE_EULER + /* Display Euler angles in degrees */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetEuler(euler, &q); + Serial.print("euler\t"); + Serial.print(euler[0] * 180/M_PI); + Serial.print("\t"); + Serial.print(euler[1] * 180/M_PI); + Serial.print("\t"); + Serial.println(euler[2] * 180/M_PI); + #endif -#ifdef OUTPUT_READABLE_YAWPITCHROLL - // display Euler angles in degrees - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); - Serial.print("ypr\t"); - Serial.print(ypr[0] * 180/M_PI); - Serial.print("\t"); - Serial.print(ypr[1] * 180/M_PI); - Serial.print("\t"); - Serial.println(ypr[2] * 180/M_PI); -#endif + #ifdef OUTPUT_READABLE_YAWPITCHROLL + /* Display Euler angles in degrees */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); + Serial.print("ypr\t"); + Serial.print(ypr[0] * 180/M_PI); + Serial.print("\t"); + Serial.print(ypr[1] * 180/M_PI); + Serial.print("\t"); + Serial.println(ypr[2] * 180/M_PI); + #endif -#ifdef OUTPUT_READABLE_REALACCEL - // display real acceleration, adjusted to remove gravity - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); - Serial.print("areal\t"); - Serial.print(aaReal.x); - Serial.print("\t"); - Serial.print(aaReal.y); - Serial.print("\t"); - Serial.println(aaReal.z); -#endif + #ifdef OUTPUT_READABLE_REALACCEL + /* Display real acceleration, adjusted to remove gravity */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetAccel(&aa, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); + Serial.print("areal\t"); + Serial.print(aaReal.x); + Serial.print("\t"); + Serial.print(aaReal.y); + Serial.print("\t"); + Serial.println(aaReal.z); + #endif -#ifdef OUTPUT_READABLE_WORLDACCEL - // display initial world-frame acceleration, adjusted to remove gravity - // and rotated based on known orientation from quaternion - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); - mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); - Serial.print("aworld\t"); - Serial.print(aaWorld.x); - Serial.print("\t"); - Serial.print(aaWorld.y); - Serial.print("\t"); - Serial.println(aaWorld.z); -#endif + #ifdef OUTPUT_READABLE_WORLDACCEL + /* Display initial world-frame acceleration, adjusted to remove gravity + and rotated based on known orientation from Quaternion */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetAccel(&aa, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); + mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); + Serial.print("aworld\t"); + Serial.print(aaWorld.x); + Serial.print("\t"); + Serial.print(aaWorld.y); + Serial.print("\t"); + Serial.println(aaWorld.z); + #endif } } -/**************************************************************************/ -/* - Arduino loop function, called once 'setup' is complete (your own code - should go here) -*/ -/**************************************************************************/ -void loop(void) -{ +void setup(){ + Serial.begin(115200); //115200 is required for Teapot Demo output + Serial.println(F("\nOrientation Sensor OSC output")); Serial.println(); + + /*WiFiManager*/ + WiFiManager wifiManager; // Initializate WiFi Manager + //wifiManager.resetSettings(); //Reset saved settings + + /*Fetches ssid and pass from eeprom and tries to connect + if it does not connect it starts an access point with the specified name + and goes into a blocking loop awaiting configuration*/ + wifiManager.autoConnect(DEVICE_NAME); + + Serial.print(F("WiFi connected! IP address: ")); + Serial.println(WiFi.localIP()); + + mpu_setup(); +} + +void loop(){ if (WiFi.status() != WL_CONNECTED) { Serial.println(); - Serial.println("*** Disconnected from AP so rebooting ***"); + Serial.println("*** Disconnected from AP, rebooting ***"); Serial.println(); #if defined(ESP8266) ESP.reset(); @@ -372,6 +317,5 @@ void loop(void) ESP.restart(); #endif } - mpu_loop(); } diff --git a/examples/MPU6050_DMP6_ESPWiFi/Processing/MPUOSCTeapot/MPUOSCTeapot.pde b/examples/MPU6050_DMP6_ESPWiFi/Processing/MPUOSCTeapot/MPUOSCTeapot.pde index d7dd7f1..77f435f 100755 --- a/examples/MPU6050_DMP6_ESPWiFi/Processing/MPUOSCTeapot/MPUOSCTeapot.pde +++ b/examples/MPU6050_DMP6_ESPWiFi/Processing/MPUOSCTeapot/MPUOSCTeapot.pde @@ -1,61 +1,26 @@ -// I2C device class (I2Cdev) demonstration Processing sketch for MPU6050 DMP output -// 6/20/2012 by Jeff Rowberg -// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib -// -// Changelog: -// 2012-06-20 - initial release - -/* ============================================ -I2Cdev device library code is placed under the MIT license -Copyright (c) 2012 Jeff Rowberg - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -=============================================== -*/ - -/** - * MPUOSCTeapot Processing demo for MPU6050 DMP modified for OSC - * https://gitub.com/jrowberg/i2cdevlib - * The original demo uses serial port I/O which has been replaced with - * OSC UDP messages in this sketch. - * - * The MPU6050 is connected to an ESP8266 with battery so it is completely - * wire free. - * - * Tested on Processing 3.3.5 running on Ubuntu Linux 14.04 - * - * Dependencies installed using Library Manager - * - * Open Sound Control library - * oscP5 website at http://www.sojamo.de/oscP5 - * ToxicLibs - * quaternion functions https://github.com/postspectacular/toxiclibs/ +/* + MPU OSC Teapot Processing demo for MPU6050 DMP modified for OSC + + The original demo uses serial port I/O which has been replaced with + OSC UDP messages in this sketch. + + The MPU6050 is connected to an ESP8266 with battery so it is completely + wire free. + + Tested on Processing 3.3.5 running on Ubuntu Linux 14.04 + + Dependencies installed using Library Manager + + Note: oscP5 and ToxicLibs libraries are required: + 1. Download both libraries from the corresponding links: + * Open Sound Control library: https://sojamo.de/libraries/oscP5/ + * Download from https://github.com/postspectacular/toxiclibs/releases + 2.Extract into [userdir]/Documents/Processing/libraries (location may be different on Mac/Linux) + 3. Restart Processing if needed */ -// Install oscP5 using the IDE library manager. -// From the IDE menu bar, Sketch | Import Library | Add library. -// In the search box type "osc". import oscP5.*; import netP5.*; -// 1. Download from https://github.com/postspectacular/toxiclibs/releases -// 2. Extract into [userdir]/Processing/libraries -// (location may be different on Mac/Linux) import toxi.geom.*; import toxi.processing.*; @@ -66,26 +31,29 @@ Quaternion quat = new Quaternion(1, 0, 0, 0); OscP5 oscP5; void setup() { - // 300px square viewport using OpenGL rendering + /* 300px square viewport using OpenGL rendering*/ size(300, 300, P3D); gfx = new ToxiclibsSupport(this); - // setup lights and antialiasing + /*Setup lights and antialiasing*/ lights(); smooth(); - /* start oscP5, listening for incoming messages at port 9999 */ + /* Start oscP5, listening for incoming messages at port 9999 */ oscP5 = new OscP5(this, 9999); oscP5.plug(this, "imu", "/imuquat"); } -/* incoming osc message are forwarded to the oscEvent method. */ +/* Incoming OSC message are forwarded to the oscEvent method. */ void oscEvent(OscMessage theOscMessage) { - /* print the address pattern and the typetag of the received OscMessage */ - //print("### received an osc message."); - //print(" addrpattern: "+theOscMessage.addrPattern()); - //println(" typetag: "+theOscMessage.typetag()); + /* Print the address pattern and the typetag of the received OscMessage */ + + /* + print("### received an osc message."); + print(" addrpattern: "+theOscMessage.addrPattern()); + println(" typetag: "+theOscMessage.typetag()); + */ } public void imu(float quant_w, float quant_x, float quant_y, float quant_z) { @@ -94,45 +62,43 @@ public void imu(float quant_w, float quant_x, float quant_y, float quant_z) { } void draw() { - // black background - background(0); + background(0); //Black background - // translate everything to the middle of the viewport pushMatrix(); - translate(width / 2, height / 2); + translate(width / 2, height / 2); //Translate everything to the middle of the viewport - // 3-step rotation from yaw/pitch/roll angles (gimbal lock!) - // ...and other weirdness I haven't figured out yet + /* 3-step rotation from yaw/pitch/roll angles (gimbal lock!)*/ //rotateY(-ypr[0]); //rotateZ(-ypr[1]); //rotateX(-ypr[2]); - // toxiclibs direct angle/axis rotation from quaternion (NO gimbal lock!) - // (axis order [1, 3, 2] and inversion [-1, +1, +1] is a consequence of - // different coordinate system orientation assumptions between Processing - // and InvenSense DMP) + /* ToxicLibs direct angle/axis rotation from quaternion (NO gimbal lock!) + (axis order [1, 3, 2] and inversion [-1, +1, +1] is a consequence of + different coordinate system orientation assumptions between Processing + and InvenSense DMP) + */ float[] axis = quat.toAxisAngle(); rotate(axis[0], -axis[1], axis[3], axis[2]); - - // draw main body in red - fill(255, 0, 0, 200); + + /*Draw main body in red*/ + fill(255, 0, 0, 200); box(10, 10, 200); - // draw front-facing tip in blue - fill(0, 0, 255, 200); + /*Draw front-facing tip in blue*/ + fill(0, 0, 255, 200); pushMatrix(); translate(0, 0, -120); rotateX(PI/2); drawCylinder(0, 20, 20, 8); popMatrix(); - // draw wings and tail fin in green - fill(0, 255, 0, 200); + /*Draw wings and tail fin in green*/ + fill(0, 255, 0, 200); beginShape(TRIANGLES); - vertex(-100, 2, 30); vertex(0, 2, -80); vertex(100, 2, 30); // wing top layer - vertex(-100, -2, 30); vertex(0, -2, -80); vertex(100, -2, 30); // wing bottom layer - vertex(-2, 0, 98); vertex(-2, -30, 98); vertex(-2, 0, 70); // tail left layer - vertex( 2, 0, 98); vertex( 2, -30, 98); vertex( 2, 0, 70); // tail right layer + vertex(-100, 2, 30); vertex(0, 2, -80); vertex(100, 2, 30); //Wing top layer + vertex(-100, -2, 30); vertex(0, -2, -80); vertex(100, -2, 30); //Wing bottom layer + vertex(-2, 0, 98); vertex(-2, -30, 98); vertex(-2, 0, 70); //Tail left layer + vertex( 2, 0, 98); vertex( 2, -30, 98); vertex( 2, 0, 70); //Tail right layer endShape(); beginShape(QUADS); vertex(-100, 2, 30); vertex(-100, -2, 30); vertex( 0, -2, -80); vertex( 0, 2, -80); @@ -157,12 +123,12 @@ void drawCylinder(float topRadius, float bottomRadius, float tall, int sides) { } endShape(); - // If it is not a cone, draw the circular top cap + /*If it is not a cone, draw the circular top cap*/ if (topRadius != 0) { angle = 0; beginShape(TRIANGLE_FAN); - // Center point + /*Center point*/ vertex(0, 0, 0); for (int i = 0; i < sides + 1; i++) { vertex(topRadius * cos(angle), 0, topRadius * sin(angle)); @@ -171,7 +137,7 @@ void drawCylinder(float topRadius, float bottomRadius, float tall, int sides) { endShape(); } - // If it is not a cone, draw the circular bottom cap + /*If it is not a cone, draw the circular bottom cap*/ if (bottomRadius != 0) { angle = 0; beginShape(TRIANGLE_FAN); diff --git a/examples/MPU6050_DMP6_Ethernet/MPU6050_DMP6_Ethernet.ino b/examples/MPU6050_DMP6_Ethernet/MPU6050_DMP6_Ethernet.ino index c6891f7..5fab5a4 100755 --- a/examples/MPU6050_DMP6_Ethernet/MPU6050_DMP6_Ethernet.ino +++ b/examples/MPU6050_DMP6_Ethernet/MPU6050_DMP6_Ethernet.ino @@ -1,545 +1,452 @@ -// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class using DMP (MotionApps v2.0) over Ethernet -// 2/27/2016 by hellphoenix -// Based on I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class using DMP (MotionApps v2.0) (6/21/2012 by Jeff Rowberg ) -// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib -// -// Changelog: -// 2016-04-18 - Eliminated a potential infinite loop -// 2016-02-28 - Cleaned up code to be in line with other example codes -// - Added Ethernet outputs for Quaternion, Euler, RealAccel, WorldAccel -// 2016-02-27 - Initial working code compiled -// Bugs: -// - There is still a hangup after some time, though it only occurs when you are reading data from the website. -// If you only read the data from the serial port, there are no hangups. -/* ============================================ -I2Cdev device library code is placed under the MIT license -Copyright (c) 2012 Jeff Rowberg - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -=============================================== +/* + MPU6050 DMP6 + + Digital Motion Processor or DMP performs complex motion processing tasks. + - Fuses the data from the accel, gyro and extarnal magnetometer if applies, + compesating individual sensor noise and errors. + - Detect specific types of motion without the need to continuosly monitor + raw sensor data with a microcontroller. + - Reduce workload on the microprocessor. + - Output processed data such as quaternions, Euler angles, and gravity vectors. + + Send the data trough a HTTP request using the Arduino Ethernet Shield + + This code is compatible with teapot propject by using the teapot output format. + + Circuit: In addition to connection 3.3v, GND, SDA, and SCL, this sketch + depends on the MPU6050's INT pin being connected to the Arduino's + external interrupt #0 pin.. + + Find the full MPU6050 library docummentation here: + https://github.com/ElectronicCats/mpu6050/wiki */ -#include -// I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files -// for both classes must be in the include path of your project -#include "I2Cdev.h" +#include // Arduino Ethernet Shield +#include "avr/wdt.h" // Watchdog library +#include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" -//#include "MPU6050.h" // not necessary if using MotionApps include file -// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation -// is used in I2Cdev.h -#include "Wire.h" -#include "avr/wdt.h"// Watchdog library - -// class default I2C address is 0x68 -// specific I2C addresses may be passed as a parameter here -// AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board) -// AD0 high = 0x69 +/* MPU6050 default I2C address is 0x68*/ MPU6050 mpu; -//MPU6050 mpu(0x69); // <-- use for AD0 high - -// MAC address from Ethernet shield sticker under board -byte mac[] = { - 0x90, 0xA2, 0xDA, 0x10, 0x26, 0x82 -}; -// assign an IP address for the controller: -IPAddress ip(192,168,1,50); -// the router's gateway address: -byte gateway[] = { 192, 168, 1, 1 }; -// the subnet: -byte subnet[] = { 255, 255, 0, 0 }; - -// Initialize the Ethernet server library -// with the IP address and port you want to use -// (port 80 is default for HTTP): -EthernetServer server(80); +//MPU6050 mpu(0x69); //Use for AD0 high +//MPU6050 mpu(0x68, &Wire1); //Use for AD0 low, but 2nd Wire (TWI/I2C) object. -String HTTP_req; // stores the HTTP request +/*Ethernet Shield variables definition*/ +byte mac[] = {0x90, 0xA2, 0xDA, 0x10, 0x26, 0x82}; // MAC address from Ethernet shield sticker under board +IPAddress ip(192,168,1,50); // Assign an IP address +byte gateway[] = { 192, 168, 1, 1 }; // Router's gateway address +byte subnet[] = { 255, 255, 0, 0 }; // Subnet +String HTTP_req; // Stores the HTTP request -/* ========================================================================= - NOTE: In addition to connection 3.3v, GND, SDA, and SCL, this sketch - depends on the MPU-6050's INT pin being connected to the Arduino's - external interrupt #0 pin. On the Arduino Uno and Mega 2560, this is - digital I/O pin 2. - * ========================================================================= */ +/*Initialize the Ethernet server library (port 80 is default for HTTP)*/ +EthernetServer server(80); -/* ========================================================================= - NOTE: Arduino v1.0.1 with the Leonardo board generates a compile error - when using Serial.write(buf, len). The Teapot output uses this method. - The solution requires a modification to the Arduino USBAPI.h file, which - is fortunately simple, but annoying. This will be fixed in the next IDE - release. For more info, see these links: +/* OUTPUT FORMAT DEFINITION------------------------------------------------------------------------------------------- +- Use "OUTPUT_READABLE_QUATERNION" for quaternion commponents in [w, x, y, z] format. Quaternion do not +suffer from gimbal lock problem but is harder to parse or process efficiently on a remotehost or software +enviroments like Porcessing. - http://arduino.cc/forum/index.php/topic,109987.0.html - http://code.google.com/p/arduino/issues/detail?id=958 - * ========================================================================= */ +- Use "OUTPUT_READABLE_EULER" for Euler angles (in degrees) output, calculated from the quaternions coming +from the FIFO. EULER ANGLES SUFFER FROM GIMBAL LOCK PROBLEM. +- Use "OUTPUT_READABLE_YAWPITCHROLL" for yaw/pitch/roll angles (in degrees) calculated from the quaternions +coming from the FIFO. THIS REQUIRES GRAVITY VECTOR CALCULATION. +YAW/PITCH/ROLL ANGLES SUFFER FROM GIMBAL LOCK PROBLEM. -// uncomment "OUTPUT_READABLE_QUATERNION" if you want to see the actual -// quaternion components in a [w, x, y, z] format (not best for parsing -// on a remote host such as Processing or something though) -//#define OUTPUT_READABLE_QUATERNION +- Use "OUTPUT_READABLE_REALACCEL" for acceleration components with gravity removed. The accel reference frame +is not compesated for orientation. +X will always be +X according to the sensor. -// uncomment "OUTPUT_READABLE_EULER" if you want to see Euler angles -// (in degrees) calculated from the quaternions coming from the FIFO. -// Note that Euler angles suffer from gimbal lock (for more info, see -// http://en.wikipedia.org/wiki/Gimbal_lock) -//#define OUTPUT_READABLE_EULER +- Use "OUTPUT_READABLE_WORLDACCEL" for acceleration components with gravity removed and adjusted for the world +refernce frame. Yaw is relative if there is no magnetometer present. -// uncomment "OUTPUT_READABLE_YAWPITCHROLL" if you want to see the yaw/ -// pitch/roll angles (in degrees) calculated from the quaternions coming -// from the FIFO. Note this also requires gravity vector calculations. -// Also note that yaw/pitch/roll angles suffer from gimbal lock (for -// more info, see: http://en.wikipedia.org/wiki/Gimbal_lock) +- Use "OUTPUT_TEAPOT" for output that matches the InvenSense teapot demo. +-------------------------------------------------------------------------------------------------------------------------------*/ #define OUTPUT_READABLE_YAWPITCHROLL - -// uncomment "OUTPUT_READABLE_REALACCEL" if you want to see acceleration -// components with gravity removed. This acceleration reference frame is -// not compensated for orientation, so +X is always +X according to the -// sensor, just without the effects of gravity. If you want acceleration -// compensated for orientation, us OUTPUT_READABLE_WORLDACCEL instead. +//#define OUTPUT_READABLE_QUATERNION +//#define OUTPUT_READABLE_EULER //#define OUTPUT_READABLE_REALACCEL - -// uncomment "OUTPUT_READABLE_WORLDACCEL" if you want to see acceleration -// components with gravity removed and adjusted for the world frame of -// reference (yaw is relative to initial orientation, since no magnetometer -// is present in this case). Could be quite handy in some cases. //#define OUTPUT_READABLE_WORLDACCEL - -// uncomment "OUTPUT_TEAPOT" if you want output that matches the -// format used for the InvenSense teapot demo //#define OUTPUT_TEAPOT -#define INTERRUPT_PIN 2 // use pin 2 on Arduino Uno & most boards -#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6) -bool blinkState = false; - -// MPU control/status vars -bool dmpReady = false; // set true if DMP init was successful -uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU -uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) -uint16_t packetSize; // expected DMP packet size (default is 42 bytes) -uint16_t fifoCount; // count of all bytes currently in FIFO -uint8_t fifoBuffer[64]; // FIFO storage buffer - -// orientation/motion vars -Quaternion q; // [w, x, y, z] quaternion container -VectorInt16 aa; // [x, y, z] accel sensor measurements -VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements -VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements -VectorFloat gravity; // [x, y, z] gravity vector +int const INTERRUPT_PIN = 2; // Define the interruption #0 pin +bool blinkState; + +/*---MPU6050 Control/Status Variables---*/ +bool DMPReady = false; // Set true if DMP init was successful +uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU +uint8_t devStatus; // Return status after each device operation (0 = success, !0 = error) +uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) +uint8_t FIFOBuffer[64]; // FIFO storage buffer +uint16_t FIFOCount; // Count of all bytes currently in FIFO + +/*---Orientation/Motion Variables---*/ +Quaternion q; // [w, x, y, z] Quaternion container +VectorInt16 aa; // [x, y, z] Accel sensor measurements +VectorInt16 aaReal; // [x, y, z] Gravity-free accel sensor measurements +VectorInt16 aaWorld; // [x, y, z] World-frame accel sensor measurements +VectorFloat gravity; // [x, y, z] Gravity vector float euler[3]; // [psi, theta, phi] Euler angle container -float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector - -// packet structure for InvenSense teapot demo -uint8_t teapotPacket[14] = { '$', 0x02, 0,0, 0,0, 0,0, 0,0, 0x00, 0x00, '\r', '\n' }; +float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector +/*-Packet structure for InvenSense teapot demo-*/ +uint8_t teapotPacket[14] = { '$', 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0x00, '\r', '\n' }; - -// ================================================================ -// === INTERRUPT DETECTION ROUTINE === -// ================================================================ - -volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high -void dmpDataReady() { - mpuInterrupt = true; +/*------Interrupt detection routine------*/ +volatile bool MPUInterrupt = false; // Indicates whether MPU6050 interrupt pin has gone high +void DMPDataReady() { + MPUInterrupt = true; } -// ================================================================ -// === INITIAL SETUP === -// ================================================================ void setup() { - wdt_enable(WDTO_1S); //Watchdog enable. - //WDTO_1S sets the watchdog timer to 1 second. The time set here is approximate. - // You can find more time settings at http://www.nongnu.org/avr-libc/user-manual/group__avr__watchdog.html . - - // join I2C bus (I2Cdev library doesn't do this automatically) - #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE - Wire.begin(); - Wire.setClock(400000); // 400kHz I2C clock (200kHz if CPU is 8MHz). Comment this line if having compilation difficulties - #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE - Fastwire::setup(400, true); - #endif - - // initialize serial communication - // (115200 chosen because it is required for Teapot Demo output, but it's - // really up to you depending on your project) - Serial.begin(115200); - // NOTE: 8MHz or slower host processors, like the Teensy @ 3.3V or Arduino - // Pro Mini running at 3.3V, cannot handle this baud rate reliably due to - // the baud timing being too misaligned with processor ticks. You must use - // 38400 or slower in these cases, or use some kind of external separate - // crystal solution for the UART timer. - - Ethernet.begin(mac, ip, gateway, subnet); - server.begin(); - Serial.print("server is at "); - Serial.println(Ethernet.localIP()); - while (!Serial); // wait for Leonardo enumeration, others continue immediately - - // initialize device - Serial.println(F("Initializing I2C devices...")); - mpu.initialize(); - pinMode(INTERRUPT_PIN, INPUT); - - // verify connection - Serial.println(F("Testing device connections...")); - Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed")); - - // load and configure the DMP - Serial.println(F("Initializing DMP...")); - devStatus = mpu.dmpInitialize(); - - // supply your own gyro offsets here, scaled for min sensitivity - mpu.setXGyroOffset(220); - mpu.setYGyroOffset(76); - mpu.setZGyroOffset(-85); - mpu.setZAccelOffset(1788); // 1688 factory default for my test chip - - // make sure it worked (returns 0 if so) - if (devStatus == 0) { - // turn on the DMP, now that it's ready - Serial.println(F("Enabling DMP...")); - mpu.setDMPEnabled(true); - - // enable Arduino interrupt detection - Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); - Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); - Serial.println(F(")...")); - attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING); - mpuIntStatus = mpu.getIntStatus(); - - // set our DMP Ready flag so the main loop() function knows it's okay to use it - Serial.println(F("DMP ready! Waiting for first interrupt...")); - dmpReady = true; - - // get expected DMP packet size for later comparison - packetSize = mpu.dmpGetFIFOPacketSize(); - } else { - // ERROR! - // 1 = initial memory load failed - // 2 = DMP configuration updates failed - // (if it's going to break, usually the code will be 1) - Serial.print(F("DMP Initialization failed (code ")); - Serial.print(devStatus); - Serial.println(F(")")); - } - - // configure LED for output - pinMode(LED_PIN, OUTPUT); + wdt_enable(WDTO_1S); //WDTO_1S sets the watchdog timer to 1 second. The time set here is approximate. + + #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE + Wire.begin(); + Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties + #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE + Fastwire::setup(400, true); + #endif + + Serial.begin(115200); //115200 is required for Teapot Demo output + + Ethernet.begin(mac, ip, gateway, subnet); + server.begin(); + Serial.print("Server is at "); + Serial.println(Ethernet.localIP()); + while (!Serial); + + /*Initialize device*/ + Serial.println(F("Initializing I2C devices...")); + mpu.initialize(); + pinMode(INTERRUPT_PIN, INPUT); + + /*Verify connection*/ + Serial.println(F("Testing MPU6050 connection...")); + if(mpu.testConnection() == false){ + Serial.println("MPU6050 connection failed"); + while(true); + } + else { + Serial.println("MPU6050 connection successful"); + } + + /* Initializate and configure the DMP*/ + Serial.println(F("Initializing DMP...")); + devStatus = mpu.dmpInitialize(); + + /* Supply your gyro offsets here, scaled for min sensitivity */ + mpu.setXGyroOffset(0); + mpu.setYGyroOffset(0); + mpu.setZGyroOffset(0); + mpu.setXAccelOffset(0); + mpu.setYAccelOffset(0); + mpu.setZAccelOffset(0); + + /* Making sure it worked (returns 0 if so) */ + if (devStatus == 0) { + /*Calibration routine*/ + //mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + //mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + Serial.println(F("Enabling DMP...")); //Turning ON DMP + mpu.setDMPEnabled(true); + + /*Enable Arduino interrupt detection*/ + Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); + Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); + Serial.println(F(")...")); + attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), DMPDataReady, RISING); + MPUIntStatus = mpu.getIntStatus(); + + /* Set the DMP Ready flag so the main loop() function knows it is okay to use it */ + Serial.println(F("DMP ready! Waiting for first interrupt...")); + DMPReady = true; + packetSize = mpu.dmpGetFIFOPacketSize(); //Get expected DMP packet size for later comparison + } + else { + Serial.print(F("DMP Initialization failed (code ")); //Print the error code + Serial.print(devStatus); + Serial.println(F(")")); + // 1 = initial memory load failed + // 2 = DMP configuration updates failed + } + pinMode(LED_BUILTIN, OUTPUT); } - - -// ================================================================ -// === MAIN PROGRAM LOOP === -// ================================================================ - void loop() { - // if programming failed, don't try to do anything - if (!dmpReady) return; - - wdt_reset();//Resets the watchdog timer. If the timer is not reset, and the timer expires, a watchdog-initiated device reset will occur. - // wait for MPU interrupt or extra packet(s) available - while (!mpuInterrupt && fifoCount < packetSize) { - if (mpuInterrupt && fifoCount < packetSize) { - // try to get out of the infinite loop - fifoCount = mpu.getFIFOCount(); - } - // other program behavior stuff here - // . - // . - // if you are really paranoid you can frequently test in between other - // stuff to see if mpuInterrupt is true, and if so, "break;" from the - // while() loop to immediately process the MPU data - // . - // . - // . - } - - // reset interrupt flag and get INT_STATUS byte - mpuInterrupt = false; - mpuIntStatus = mpu.getIntStatus(); - - // get current FIFO count - fifoCount = mpu.getFIFOCount(); - - // check for overflow (this should never happen unless our code is too inefficient) - if ((mpuIntStatus & _BV(MPU6050_IMU::MPU6050_INTERRUPT_FIFO_OFLOW_BIT)) || fifoCount >= 1024) { - // reset so we can continue cleanly - mpu.resetFIFO(); - fifoCount = mpu.getFIFOCount(); - Serial.println(F("FIFO overflow!")); - - // otherwise, check for DMP data ready interrupt (this should happen frequently) - } else if (mpuIntStatus & _BV(MPU6050_IMU::MPU6050_INTERRUPT_DMP_INT_BIT)) { - // wait for correct available data length, should be a VERY short wait - while (fifoCount < packetSize) fifoCount = mpu.getFIFOCount(); - - // read a packet from FIFO, then clear the buffer - mpu.getFIFOBytes(fifoBuffer, packetSize); - //mpu.resetFIFO(); - - // track FIFO count here in case there is > 1 packet available - // (this lets us immediately read more without waiting for an interrupt) - fifoCount -= packetSize; - - #ifdef OUTPUT_READABLE_QUATERNION - // display quaternion values in easy matrix form: w x y z - mpu.dmpGetQuaternion(&q, fifoBuffer); - Serial.print("quat\t"); - Serial.print(q.w); - Serial.print("\t"); - Serial.print(q.x); - Serial.print("\t"); - Serial.print(q.y); - Serial.print("\t"); - Serial.println(q.z); - #endif - #ifdef OUTPUT_READABLE_EULER - // display Euler angles in degrees - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetEuler(euler, &q); - Serial.print("euler\t"); - Serial.print(euler[0] * 180/M_PI); - Serial.print("\t"); - Serial.print(euler[1] * 180/M_PI); - Serial.print("\t"); - Serial.println(euler[2] * 180/M_PI); - #endif - #ifdef OUTPUT_READABLE_YAWPITCHROLL - // display Euler angles in degrees - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); - Serial.print("ypr\t"); - Serial.print(ypr[0] * 180/M_PI); - Serial.print("\t"); - Serial.print(ypr[1] * 180/M_PI); - Serial.print("\t"); - Serial.println(ypr[2] * 180/M_PI); - #endif - #ifdef OUTPUT_READABLE_REALACCEL - // display real acceleration, adjusted to remove gravity - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); - Serial.print("areal\t"); - Serial.print(aaReal.x); - Serial.print("\t"); - Serial.print(aaReal.y); - Serial.print("\t"); - Serial.println(aaReal.z); - #endif - #ifdef OUTPUT_READABLE_WORLDACCEL - // display initial world-frame acceleration, adjusted to remove gravity - // and rotated based on known orientation from quaternion - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); - mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); - Serial.print("aworld\t"); - Serial.print(aaWorld.x); - Serial.print("\t"); - Serial.print(aaWorld.y); - Serial.print("\t"); - Serial.println(aaWorld.z); - #endif - #ifdef OUTPUT_TEAPOT - // display quaternion values in InvenSense Teapot demo format: - teapotPacket[2] = fifoBuffer[0]; - teapotPacket[3] = fifoBuffer[1]; - teapotPacket[4] = fifoBuffer[4]; - teapotPacket[5] = fifoBuffer[5]; - teapotPacket[6] = fifoBuffer[8]; - teapotPacket[7] = fifoBuffer[9]; - teapotPacket[8] = fifoBuffer[12]; - teapotPacket[9] = fifoBuffer[13]; - Serial.write(teapotPacket, 14); - teapotPacket[11]++; // packetCount, loops at 0xFF on purpose - #endif - serversend(); - // blink LED to indicate activity - blinkState = !blinkState; - digitalWrite(LED_PIN, blinkState); - } + if (!DMPReady) return; // Stop the program if DMP programming fails. + + wdt_reset(); // Resets the watchdog timer. If the timer is not reset, and the timer expires, a watchdog-initiated device reset will occur. + /*Wait for MPU interrupt or extra packet(s) available*/ + while (!MPUInterrupt && FIFOCount < packetSize) { + if (MPUInterrupt && FIFOCount < packetSize) { + FIFOCount = mpu.getFIFOCount(); // Try to get out of the infinite loop + } + /* Write your code here + If you are really paranoid you can frequently test in between other + stuff to see if MPUInterrupt is true, and if so, "break;" from the + while() loop to immediately process the MPU data + */ + } + + MPUInterrupt = false; // Reset interrupt flag and get INT_STATUS byte + MPUIntStatus = mpu.getIntStatus(); + FIFOCount = mpu.getFIFOCount(); // Get current FIFO count + + /*Check for overflow (this should never happen unless our code is too inefficient)*/ + if ((MPUIntStatus & (1 << MPU6050_INTERRUPT_FIFO_OFLOW_BIT)) || FIFOCount >= 1024) { + mpu.resetFIFO(); // Reset so we can continue cleanly + FIFOCount = mpu.getFIFOCount(); + Serial.println(F("FIFO overflow!")); + } + /*Otherwise, check for DMP data ready interrupt (this should happen frequently)*/ + else if (MPUIntStatus & (1 << MPU6050_INTERRUPT_DMP_INT_BIT)) { + while (FIFOCount < packetSize) FIFOCount = mpu.getFIFOCount(); //Wait for correct available data length, should be a VERY short wait + mpu.getFIFOBytes(FIFOBuffer, packetSize); // Read a packet from FIFO, then clear the buffer + //mpu.resetFIFO(); + /*Track FIFO count here in case there is > 1 packet available + (this lets us immediately read more without waiting for an interrupt)*/ + FIFOCount -= packetSize; + + #ifdef OUTPUT_READABLE_YAWPITCHROLL + /* Display Euler angles in degrees */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); + Serial.print("ypr\t"); + Serial.print(ypr[0] * 180/M_PI); + Serial.print("\t"); + Serial.print(ypr[1] * 180/M_PI); + Serial.print("\t"); + Serial.println(ypr[2] * 180/M_PI); + #endif + + #ifdef OUTPUT_READABLE_QUATERNION + /* Display Quaternion values in easy matrix form: [w, x, y, z] */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + Serial.print("quat\t"); + Serial.print(q.w); + Serial.print("\t"); + Serial.print(q.x); + Serial.print("\t"); + Serial.print(q.y); + Serial.print("\t"); + Serial.println(q.z); + #endif + + #ifdef OUTPUT_READABLE_EULER + /* Display Euler angles in degrees */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetEuler(euler, &q); + Serial.print("euler\t"); + Serial.print(euler[0] * 180/M_PI); + Serial.print("\t"); + Serial.print(euler[1] * 180/M_PI); + Serial.print("\t"); + Serial.println(euler[2] * 180/M_PI); + #endif + + #ifdef OUTPUT_READABLE_REALACCEL + /* Display real acceleration, adjusted to remove gravity */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetAccel(&aa, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); + Serial.print("areal\t"); + Serial.print(aaReal.x); + Serial.print("\t"); + Serial.print(aaReal.y); + Serial.print("\t"); + Serial.println(aaReal.z); + #endif + + #ifdef OUTPUT_READABLE_WORLDACCEL + /* Display initial world-frame acceleration, adjusted to remove gravity + and rotated based on known orientation from Quaternion */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetAccel(&aa, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); + mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); + Serial.print("aworld\t"); + Serial.print(aaWorld.x); + Serial.print("\t"); + Serial.print(aaWorld.y); + Serial.print("\t"); + Serial.println(aaWorld.z); + #endif + + #ifdef OUTPUT_TEAPOT + /* Display quaternion values in InvenSense Teapot demo format */ + teapotPacket[2] = FIFOBuffer[0]; + teapotPacket[3] = FIFOBuffer[1]; + teapotPacket[4] = FIFOBuffer[4]; + teapotPacket[5] = FIFOBuffer[5]; + teapotPacket[6] = FIFOBuffer[8]; + teapotPacket[7] = FIFOBuffer[9]; + teapotPacket[8] = FIFOBuffer[12]; + teapotPacket[9] = FIFOBuffer[13]; + Serial.write(teapotPacket, 14); + teapotPacket[11]++; // PacketCount, loops at 0xFF on purpose + #endif + /* Blink LED to indicate activity */ + blinkState = !blinkState; + digitalWrite(LED_BUILTIN, blinkState); + } } void serversend(){ - - EthernetClient client = server.available(); // try to get client - - if (client) { // got client? - //boolean currentLineIsBlank = true; - while (client.connected()) { - if (client.available()) { // client data available to read - char c = client.read(); // read 1 byte (character) from client - HTTP_req += c; // save the HTTP request 1 char at a time - // last line of client request is blank and ends with \n - // respond to client only after last line received - if (c == '\n') { - // send a standard http response header - client.println("HTTP/1.1 200 OK"); - client.println("Content-Type: text/html"); - //client.println("Connection: keep-alive"); - client.println(); - // AJAX request for switch state - if (HTTP_req.indexOf("ajax_switch") > -1) { - // read switch state and analog input - GetAjaxData(client); - } - else { // HTTP request for web page - // send web page - contains JavaScript with AJAX calls - client.println(""); - client.println(""); - client.println(""); - client.println("Arduino Web Page"); - client.println(""); - client.println(""); - client.println(""); - client.println("

MPU6050 Output

"); - client.println("
"); - client.println("
"); - client.println(""); - client.println(""); - } - // display received HTTP request on serial port - Serial.print(HTTP_req); - HTTP_req = ""; // finished with request, empty string - client.stop(); // close the connection - break; - } - } - } - } + EthernetClient client = server.available(); // Try to get client + if (client) { + //boolean currentLineIsBlank = true; + while (client.connected()){ + if (client.available()) { // Client data available to read + char c = client.read(); // Read 1 byte (character) from client + HTTP_req += c; // Save the HTTP request 1 char at a time + /* + Last line of client request is blank and ends with \n + respond to client only after last line received + */ + if (c == '\n') { + client.println("HTTP/1.1 200 OK"); // Send a standard http response header + client.println("Content-Type: text/html"); + //client.println("Connection: keep-alive"); + client.println(); + // AJAX request for switch state + if (HTTP_req.indexOf("ajax_switch") > -1) { + GetAjaxData(client); // Read switch state and analog input + } + else { // HTTP request for web page + /*Send web page - contains JavaScript with AJAX calls*/ + client.println(""); + client.println(""); + client.println(""); + client.println("Arduino Web Page"); + client.println(""); + client.println(""); + client.println(""); + client.println("

MPU6050 Output

"); + client.println("
"); + client.println("
"); + client.println(""); + client.println(""); + } + Serial.print(HTTP_req); // Display received HTTP request on serial port + HTTP_req = ""; // Finished with request, empty string + client.stop(); // Close the connection + break; + } + } + } + } } -void GetAjaxData(EthernetClient cl) -{ - #ifdef OUTPUT_READABLE_QUATERNION - // display quaternion values in easy matrix form: w x y z - cl.print("Quaternion Values:\t"); - cl.print("

w:"); - cl.print(q.w); - cl.print("\t"); - cl.println("

"); - cl.print("

x:"); - cl.print(q.x); - cl.print("\t"); - cl.println("

"); - cl.print("

y:"); - cl.print(q.y); - cl.print("\t"); - cl.println("

"); - cl.print("

z:"); - cl.print(q.z); - cl.print("\t"); - cl.println("

"); - #endif - #ifdef OUTPUT_READABLE_EULER - // display Euler angles in degrees - cl.print("Euler Angles:\t"); - cl.print("

Yaw:"); - cl.print(euler[0] * 180/M_PI); - cl.print("\t"); - cl.println("

"); - cl.print("

Pitch:"); - cl.print(euler[2] * 180/M_PI); - cl.print("\t"); - cl.println("

"); - cl.print("

Roll:"); - cl.print(euler[1] * 180/M_PI); - cl.print("\t"); - cl.println("

"); - #endif - #ifdef OUTPUT_READABLE_YAWPITCHROLL - // display Yaw/Pitch/Roll values in degrees - cl.print("Yaw, Pitch, and Roll:\t"); - cl.print("

Yaw:"); - cl.print(ypr[0] * 180/M_PI); - cl.print("\t"); - cl.println("

"); - cl.print("

Pitch:"); - cl.print(ypr[2] * 180/M_PI); - cl.print("\t"); - cl.println("

"); - cl.print("

Roll:"); - cl.print(ypr[1] * 180/M_PI); - cl.print("\t"); - cl.println("

"); - #endif - #ifdef OUTPUT_READABLE_REALACCEL - // display real acceleration, adjusted to remove gravity - cl.print("Real Accel:\t"); - cl.print("

Yaw:"); - cl.print(aaReal.x); - cl.print("\t"); - cl.println("

"); - cl.print("

Pitch:"); - cl.print(aaReal.z); - cl.print("\t"); - cl.println("

"); - cl.print("

Roll:"); - cl.print(aaReal.y); - cl.print("\t"); - cl.println("

"); - #endif - #ifdef OUTPUT_READABLE_WORLDACCEL - // display initial world-frame acceleration, adjusted to remove gravity - // and rotated based on known orientation from quaternion - cl.print("World Accel:\t"); - cl.print("

Yaw:"); - cl.print(aaWorld.x); - cl.print("\t"); - cl.println("

"); - cl.print("

Pitch:"); - cl.print(aaWorld.z); - cl.print("\t"); - cl.println("

"); - cl.print("

Roll:"); - cl.print(aaWorld.y); - cl.print("\t"); - cl.println("

"); - #endif - #ifdef OUTPUT_TEAPOT - cl.print("

teapotpacket:"); - cl.write(teapotPacket, 14); - cl.print("\t"); - cl.println("

"); - #endif +void GetAjaxData(EthernetClient cl){ + #ifdef OUTPUT_READABLE_QUATERNION + // Display quaternion values in easy matrix form: w x y z + cl.print("Quaternion Values:\t"); + cl.print("

w:"); + cl.print(q.w); + cl.print("\t"); + cl.println("

"); + cl.print("

x:"); + cl.print(q.x); + cl.print("\t"); + cl.println("

"); + cl.print("

y:"); + cl.print(q.y); + cl.print("\t"); + cl.println("

"); + cl.print("

z:"); + cl.print(q.z); + cl.print("\t"); + cl.println("

"); + #endif + #ifdef OUTPUT_READABLE_EULER + // Display Euler angles in degrees + cl.print("Euler Angles:\t"); + cl.print("

Yaw:"); + cl.print(euler[0] * 180/M_PI); + cl.print("\t"); + cl.println("

"); + cl.print("

Pitch:"); + cl.print(euler[2] * 180/M_PI); + cl.print("\t"); + cl.println("

"); + cl.print("

Roll:"); + cl.print(euler[1] * 180/M_PI); + cl.print("\t"); + cl.println("

"); + #endif + #ifdef OUTPUT_READABLE_YAWPITCHROLL + // Display Yaw/Pitch/Roll values in degrees + cl.print("Yaw, Pitch, and Roll:\t"); + cl.print("

Yaw:"); + cl.print(ypr[0] * 180/M_PI); + cl.print("\t"); + cl.println("

"); + cl.print("

Pitch:"); + cl.print(ypr[2] * 180/M_PI); + cl.print("\t"); + cl.println("

"); + cl.print("

Roll:"); + cl.print(ypr[1] * 180/M_PI); + cl.print("\t"); + cl.println("

"); + #endif + #ifdef OUTPUT_READABLE_REALACCEL + // Display real acceleration, adjusted to remove gravity + cl.print("Real Accel:\t"); + cl.print("

Yaw:"); + cl.print(aaReal.x); + cl.print("\t"); + cl.println("

"); + cl.print("

Pitch:"); + cl.print(aaReal.z); + cl.print("\t"); + cl.println("

"); + cl.print("

Roll:"); + cl.print(aaReal.y); + cl.print("\t"); + cl.println("

"); + #endif + #ifdef OUTPUT_READABLE_WORLDACCEL + /*Display initial world-frame acceleration, adjusted to remove gravity + and rotated based on known orientation from quaternion*/ + cl.print("World Accel:\t"); + cl.print("

Yaw:"); + cl.print(aaWorld.x); + cl.print("\t"); + cl.println("

"); + cl.print("

Pitch:"); + cl.print(aaWorld.z); + cl.print("\t"); + cl.println("

"); + cl.print("

Roll:"); + cl.print(aaWorld.y); + cl.print("\t"); + cl.println("

"); + #endif + #ifdef OUTPUT_TEAPOT + cl.print("

teapotpacket:"); + cl.write(teapotPacket, 14); + cl.print("\t"); + cl.println("

"); + #endif } diff --git a/examples/MPU6050_DMP6_ImuData_for_ROS/MPU6050_DMP6_ImuData_for_ROS.ino b/examples/MPU6050_DMP6_ImuData_for_ROS/MPU6050_DMP6_ImuData_for_ROS.ino index 3c47e20..bc0e38f 100644 --- a/examples/MPU6050_DMP6_ImuData_for_ROS/MPU6050_DMP6_ImuData_for_ROS.ino +++ b/examples/MPU6050_DMP6_ImuData_for_ROS/MPU6050_DMP6_ImuData_for_ROS.ino @@ -1,122 +1,151 @@ +/* + MPU6050 DMP6 for ROS + + Digital Motion Processor or DMP performs complex motion processing tasks. + - Fuses the data from the accel, gyro and extarnal magnetometer if applies, + compesating individual sensor noise and errors. + - Detect specific types of motion without the need to continuosly monitor + raw sensor data with a microcontroller. + - Reduce workload on the microprocessor. + - Output processed data such as quaternions, Euler angles, and gravity vectors. + + The code incluces an auto calibration and offset generator tasks. Different + output formats available. + + Find the full MPU6050 library docummentation here: + https://github.com/ElectronicCats/mpu6050/wiki +*/ + #include "I2Cdev.h" #include "MPU6050_6Axis_MotionApps20.h" -//#include "MPU6050.h" // not necessary if using MotionApps include file - -// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation -// is used in I2Cdev.h -#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE - #include "Wire.h" -#endif +/* MPU6050 default I2C address is 0x68*/ MPU6050 mpu; +//MPU6050 mpu(0x69); //Use for AD0 high +//MPU6050 mpu(0x68, &Wire1); //Use for AD0 low, but 2nd Wire (TWI/I2C) object. -#define EARTH_GRAVITY_MS2 9.80665 // m/s2 +/*Conversion variables*/ +#define EARTH_GRAVITY_MS2 9.80665 //m/s2 #define DEG_TO_RAD 0.017453292519943295769236907684886 #define RAD_TO_DEG 57.295779513082320876798154814105 -// MPU control/status vars -bool dmpReady = false; // set true if DMP init was successful -uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU -uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) -uint16_t packetSize; // expected DMP packet size (default is 42 bytes) -uint16_t fifoCount; // count of all bytes currently in FIFO -uint8_t fifoBuffer[64]; // FIFO storage buffer - -// orientation/motion vars -Quaternion q; // [w, x, y, z] quaternion container -VectorInt16 aa; // [x, y, z] accel sensor measurements -VectorInt16 gg; // [x, y, z] gyro sensor measurements -VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements -VectorInt16 ggWorld; // [x, y, z] world-frame accel sensor measurements -VectorFloat gravity; // [x, y, z] gravity vector +/*---MPU6050 Control/Status Variables---*/ +bool DMPReady = false; // Set true if DMP init was successful +uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU +uint8_t devStatus; // Return status after each device operation (0 = success, !0 = error) +uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) +uint8_t FIFOBuffer[64]; // FIFO storage buffer + +/*---MPU6050 Control/Status Variables---*/ +Quaternion q; // [w, x, y, z] Quaternion container +VectorInt16 aa; // [x, y, z] Accel sensor measurements +VectorInt16 gg; // [x, y, z] Gyro sensor measurements +VectorInt16 aaWorld; // [x, y, z] World-frame accel sensor measurements +VectorInt16 ggWorld; // [x, y, z] World-frame gyro sensor measurements +VectorFloat gravity; // [x, y, z] Gravity vector float euler[3]; // [psi, theta, phi] Euler angle container -float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector +float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector void setup() { - #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE - Wire.begin(); - Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties - #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE - Fastwire::setup(400, true); - #endif - - Serial.begin(115200); - - mpu.initialize(); - devStatus = mpu.dmpInitialize(); - - // supply your own gyro offsets here, scaled for min sensitivity - mpu.setXGyroOffset(-156); - mpu.setYGyroOffset(-11); - mpu.setZGyroOffset(-14); - mpu.setXAccelOffset(-3699); - mpu.setYAccelOffset(-2519); - mpu.setZAccelOffset(1391); // 1688 factory default for my test chip - - // make sure it worked (returns 0 if so) - if (devStatus == 0) { - - mpu.CalibrateAccel(6); - mpu.CalibrateGyro(6); - mpu.PrintActiveOffsets(); - mpu.setDMPEnabled(true); - - mpuIntStatus = mpu.getIntStatus(); - - dmpReady = true; - packetSize = mpu.dmpGetFIFOPacketSize(); - } + #if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE + Wire.begin(); + Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties + #elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE + Fastwire::setup(400, true); + #endif + + Serial.begin(115200); + Serial.println(F("Initializing I2C devices...")); + mpu.initialize(); + Serial.println(F("Testing MPU6050 connection...")); + if(mpu.testConnection() == false){ + Serial.println("MPU6050 connection failed"); + while(true); + } + else { + Serial.println("MPU6050 connection successful"); + } + + /* Initializate and configure the DMP*/ + Serial.println(F("Initializing DMP...")); + devStatus = mpu.dmpInitialize(); + + /* Supply your gyro offsets here, scaled for min sensitivity */ + mpu.setXGyroOffset(0); + mpu.setYGyroOffset(0); + mpu.setZGyroOffset(0); + mpu.setXAccelOffset(0); + mpu.setYAccelOffset(0); + mpu.setZAccelOffset(0); + + /* Making sure it worked (returns 0 if so) */ + if (devStatus == 0) { + mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + Serial.println(F("Enabling DMP...")); //Turning ON DMP + mpu.setDMPEnabled(true); + + MPUIntStatus = mpu.getIntStatus(); + + /* Set the DMP Ready flag so the main loop() function knows it is okay to use it */ + Serial.println(F("DMP ready! Waiting for first interrupt...")); + DMPReady = true; + packetSize = mpu.dmpGetFIFOPacketSize(); //Get expected DMP packet size for later comparison + } } void loop() { - if (!dmpReady) return; - if (mpu.dmpGetCurrentFIFOPacket(fifoBuffer)) { // Get the Latest packet - - // display quaternion values in easy matrix form: w x y z - mpu.dmpGetQuaternion(&q, fifoBuffer); - Serial.print("quat\t"); - Serial.print(q.w); - Serial.print("\t"); - Serial.print(q.x); - Serial.print("\t"); - Serial.print(q.y); - Serial.print("\t"); - Serial.println(q.z); - - mpu.dmpGetGravity(&gravity, &q); - - // display initial world-frame acceleration, adjusted to remove gravity - // and rotated based on known orientation from quaternion - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpConvertToWorldFrame(&aaWorld, &aa, &q); - Serial.print("aworld\t"); - Serial.print(aaWorld.x * mpu.get_acce_resolution() * EARTH_GRAVITY_MS2); - Serial.print("\t"); - Serial.print(aaWorld.y * mpu.get_acce_resolution() * EARTH_GRAVITY_MS2); - Serial.print("\t"); - Serial.println(aaWorld.z * mpu.get_acce_resolution() * EARTH_GRAVITY_MS2); - - // display initial world-frame acceleration, adjusted to remove gravity - // and rotated based on known orientation from quaternion - mpu.dmpGetGyro(&gg, fifoBuffer); - mpu.dmpConvertToWorldFrame(&ggWorld, &gg, &q); - Serial.print("ggWorld\t"); - Serial.print(ggWorld.x * mpu.get_gyro_resolution() * DEG_TO_RAD); - Serial.print("\t"); - Serial.print(ggWorld.y * mpu.get_gyro_resolution() * DEG_TO_RAD); - Serial.print("\t"); - Serial.println(ggWorld.z * mpu.get_gyro_resolution() * DEG_TO_RAD); - - mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); - Serial.print("ypr\t"); - Serial.print(ypr[0] * RAD_TO_DEG); - Serial.print("\t"); - Serial.print(ypr[1] * RAD_TO_DEG); - Serial.print("\t"); - Serial.println(ypr[2] * RAD_TO_DEG); - - Serial.println(); - - delay(100); - } -} \ No newline at end of file + if (!DMPReady) return; + + /* Read a packet from FIFO */ + if (mpu.dmpGetCurrentFIFOPacket(FIFOBuffer)) { // Get the Latest packet + /*Display quaternion values in easy matrix form: w x y z */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + Serial.print("quat\t"); + Serial.print(q.w); + Serial.print("\t"); + Serial.print(q.x); + Serial.print("\t"); + Serial.print(q.y); + Serial.print("\t"); + Serial.println(q.z); + + mpu.dmpGetGravity(&gravity, &q); + + /* Display initial world-frame acceleration, adjusted to remove gravity + and rotated based on known orientation from Quaternion */ + mpu.dmpGetAccel(&aa, FIFOBuffer); + mpu.dmpConvertToWorldFrame(&aaWorld, &aa, &q); + Serial.print("aworld\t"); + Serial.print(aaWorld.x * mpu.get_acce_resolution() * EARTH_GRAVITY_MS2); + Serial.print("\t"); + Serial.print(aaWorld.y * mpu.get_acce_resolution() * EARTH_GRAVITY_MS2); + Serial.print("\t"); + Serial.println(aaWorld.z * mpu.get_acce_resolution() * EARTH_GRAVITY_MS2); + + /* Display initial world-frame acceleration, adjusted to remove gravity + and rotated based on known orientation from Quaternion */ + mpu.dmpGetGyro(&gg, FIFOBuffer); + mpu.dmpConvertToWorldFrame(&ggWorld, &gg, &q); + Serial.print("ggWorld\t"); + Serial.print(ggWorld.x * mpu.get_gyro_resolution() * DEG_TO_RAD); + Serial.print("\t"); + Serial.print(ggWorld.y * mpu.get_gyro_resolution() * DEG_TO_RAD); + Serial.print("\t"); + Serial.println(ggWorld.z * mpu.get_gyro_resolution() * DEG_TO_RAD); + + /* Display Euler angles in degrees */ + mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); + Serial.print("ypr\t"); + Serial.print(ypr[0] * RAD_TO_DEG); + Serial.print("\t"); + Serial.print(ypr[1] * RAD_TO_DEG); + Serial.print("\t"); + Serial.println(ypr[2] * RAD_TO_DEG); + + Serial.println(); + delay(100); + } +} diff --git a/examples/MPU6050_DMP6_using_DMP_V6v12/MPU6050_DMP6_using_DMP_V6v12.ino b/examples/MPU6050_DMP6_using_DMP_V6v12/MPU6050_DMP6_using_DMP_V6v12.ino deleted file mode 100644 index fd7ebf9..0000000 --- a/examples/MPU6050_DMP6_using_DMP_V6v12/MPU6050_DMP6_using_DMP_V6v12.ino +++ /dev/null @@ -1,368 +0,0 @@ -// I2C device class (I2Cdev) demonstration Arduino sketch for MPU6050 class using DMP (MotionApps v6.12) -// 6/21/2012 by Jeff Rowberg -// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib -// -// Changelog: -// 2019-07-10 - Uses the new version of the DMP Firmware V6.12 -// - Note: I believe the Teapot demo is broken with this versin as -// - the fifo buffer structure has changed -// 2016-04-18 - Eliminated a potential infinite loop -// 2013-05-08 - added seamless Fastwire support -// - added note about gyro calibration -// 2012-06-21 - added note about Arduino 1.0.1 + Leonardo compatibility error -// 2012-06-20 - improved FIFO overflow handling and simplified read process -// 2012-06-19 - completely rearranged DMP initialization code and simplification -// 2012-06-13 - pull gyro and accel data from FIFO packet instead of reading directly -// 2012-06-09 - fix broken FIFO read sequence and change interrupt detection to RISING -// 2012-06-05 - add gravity-compensated initial reference frame acceleration output -// - add 3D math helper file to DMP6 example sketch -// - add Euler output and Yaw/Pitch/Roll output formats -// 2012-06-04 - remove accel offset clearing for better results (thanks Sungon Lee) -// 2012-06-01 - fixed gyro sensitivity to be 2000 deg/sec instead of 250 -// 2012-05-30 - basic DMP initialization working - -/* ============================================ - I2Cdev device library code is placed under the MIT license - Copyright (c) 2012 Jeff Rowberg - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - =============================================== -*/ - -// I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files -// for both classes must be in the include path of your project -#include "I2Cdev.h" - -#include "MPU6050_6Axis_MotionApps612.h" -//#include "MPU6050.h" // not necessary if using MotionApps include file - -// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation -// is used in I2Cdev.h -#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE -#include "Wire.h" -#endif - -// class default I2C address is 0x68 -// specific I2C addresses may be passed as a parameter here -// AD0 low = 0x68 (default for SparkFun breakout and InvenSense evaluation board) -// AD0 high = 0x69 -MPU6050 mpu; -//MPU6050 mpu(0x69); // <-- use for AD0 high - -/* ========================================================================= - NOTE: In addition to connection 3.3v, GND, SDA, and SCL, this sketch - depends on the MPU-6050's INT pin being connected to the Arduino's - external interrupt #0 pin. On the Arduino Uno and Mega 2560, this is - digital I/O pin 2. - ========================================================================= */ - -/* ========================================================================= - NOTE: Arduino v1.0.1 with the Leonardo board generates a compile error - when using Serial.write(buf, len). The Teapot output uses this method. - The solution requires a modification to the Arduino USBAPI.h file, which - is fortunately simple, but annoying. This will be fixed in the next IDE - release. For more info, see these links: - - http://arduino.cc/forum/index.php/topic,109987.0.html - http://code.google.com/p/arduino/issues/detail?id=958 - ========================================================================= */ - - - -// uncomment "OUTPUT_READABLE_QUATERNION" if you want to see the actual -// quaternion components in a [w, x, y, z] format (not best for parsing -// on a remote host such as Processing or something though) -//#define OUTPUT_READABLE_QUATERNION - -// uncomment "OUTPUT_READABLE_EULER" if you want to see Euler angles -// (in degrees) calculated from the quaternions coming from the FIFO. -// Note that Euler angles suffer from gimbal lock (for more info, see -// http://en.wikipedia.org/wiki/Gimbal_lock) -//#define OUTPUT_READABLE_EULER - -// uncomment "OUTPUT_READABLE_YAWPITCHROLL" if you want to see the yaw/ -// pitch/roll angles (in degrees) calculated from the quaternions coming -// from the FIFO. Note this also requires gravity vector calculations. -// Also note that yaw/pitch/roll angles suffer from gimbal lock (for -// more info, see: http://en.wikipedia.org/wiki/Gimbal_lock) -#define OUTPUT_READABLE_YAWPITCHROLL - -// uncomment "OUTPUT_READABLE_REALACCEL" if you want to see acceleration -// components with gravity removed. This acceleration reference frame is -// not compensated for orientation, so +X is always +X according to the -// sensor, just without the effects of gravity. If you want acceleration -// compensated for orientation, us OUTPUT_READABLE_WORLDACCEL instead. -//#define OUTPUT_READABLE_REALACCEL - -// uncomment "OUTPUT_READABLE_WORLDACCEL" if you want to see acceleration -// components with gravity removed and adjusted for the world frame of -// reference (yaw is relative to initial orientation, since no magnetometer -// is present in this case). Could be quite handy in some cases. -//#define OUTPUT_READABLE_WORLDACCEL - -// uncomment "OUTPUT_TEAPOT" if you want output that matches the -// format used for the InvenSense teapot demo -//#define OUTPUT_TEAPOT - - - -#define INTERRUPT_PIN 2 // use pin 2 on Arduino Uno & most boards -#define LED_PIN 13 // (Arduino is 13, Teensy is 11, Teensy++ is 6) -bool blinkState = false; - -// MPU control/status vars -bool dmpReady = false; // set true if DMP init was successful -uint8_t mpuIntStatus; // holds actual interrupt status byte from MPU -uint8_t devStatus; // return status after each device operation (0 = success, !0 = error) -uint16_t packetSize; // expected DMP packet size (default is 42 bytes) -uint16_t fifoCount; // count of all bytes currently in FIFO -uint8_t fifoBuffer[64]; // FIFO storage buffer - -// orientation/motion vars -Quaternion q; // [w, x, y, z] quaternion container -VectorInt16 aa; // [x, y, z] accel sensor measurements -VectorInt16 gy; // [x, y, z] gyro sensor measurements -VectorInt16 aaReal; // [x, y, z] gravity-free accel sensor measurements -VectorInt16 aaWorld; // [x, y, z] world-frame accel sensor measurements -VectorFloat gravity; // [x, y, z] gravity vector -float euler[3]; // [psi, theta, phi] Euler angle container -float ypr[3]; // [yaw, pitch, roll] yaw/pitch/roll container and gravity vector - -// packet structure for InvenSense teapot demo -uint8_t teapotPacket[14] = { '$', 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0x00, 0x00, '\r', '\n' }; - - - -// ================================================================ -// === INTERRUPT DETECTION ROUTINE === -// ================================================================ - -volatile bool mpuInterrupt = false; // indicates whether MPU interrupt pin has gone high -void dmpDataReady() { - mpuInterrupt = true; -} - - - -// ================================================================ -// === INITIAL SETUP === -// ================================================================ - -void setup() { - // join I2C bus (I2Cdev library doesn't do this automatically) -#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE - Wire.begin(); - Wire.setClock(400000); // 400kHz I2C clock. Comment this line if having compilation difficulties -#elif I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE - Fastwire::setup(400, true); -#endif - - // initialize serial communication - // (115200 chosen because it is required for Teapot Demo output, but it's - // really up to you depending on your project) - Serial.begin(115200); - while (!Serial); // wait for Leonardo enumeration, others continue immediately - - // NOTE: 8MHz or slower host processors, like the Teensy @ 3.3V or Arduino - // Pro Mini running at 3.3V, cannot handle this baud rate reliably due to - // the baud timing being too misaligned with processor ticks. You must use - // 38400 or slower in these cases, or use some kind of external separate - // crystal solution for the UART timer. - - // initialize device - Serial.println(F("Initializing I2C devices...")); - mpu.initialize(); - pinMode(INTERRUPT_PIN, INPUT); - - // verify connection - Serial.println(F("Testing device connections...")); - Serial.println(mpu.testConnection() ? F("MPU6050 connection successful") : F("MPU6050 connection failed")); - - // wait for ready - Serial.println(F("\nSend any character to begin DMP programming and demo: ")); - while (Serial.available() && Serial.read()); // empty buffer - while (!Serial.available()); // wait for data - while (Serial.available() && Serial.read()); // empty buffer again - - // load and configure the DMP - Serial.println(F("Initializing DMP...")); - devStatus = mpu.dmpInitialize(); - - // supply your own gyro offsets here, scaled for min sensitivity - mpu.setXGyroOffset(51); - mpu.setYGyroOffset(8); - mpu.setZGyroOffset(21); - mpu.setXAccelOffset(1150); - mpu.setYAccelOffset(-50); - mpu.setZAccelOffset(1060); - // make sure it worked (returns 0 if so) - if (devStatus == 0) { - // Calibration Time: generate offsets and calibrate our MPU6050 - mpu.CalibrateAccel(6); - mpu.CalibrateGyro(6); - Serial.println(); - mpu.PrintActiveOffsets(); - // turn on the DMP, now that it's ready - Serial.println(F("Enabling DMP...")); - mpu.setDMPEnabled(true); - - // enable Arduino interrupt detection - Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); - Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); - Serial.println(F(")...")); - attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), dmpDataReady, RISING); - mpuIntStatus = mpu.getIntStatus(); - - // set our DMP Ready flag so the main loop() function knows it's okay to use it - Serial.println(F("DMP ready! Waiting for first interrupt...")); - dmpReady = true; - - // get expected DMP packet size for later comparison - packetSize = mpu.dmpGetFIFOPacketSize(); - } else { - // ERROR! - // 1 = initial memory load failed - // 2 = DMP configuration updates failed - // (if it's going to break, usually the code will be 1) - Serial.print(F("DMP Initialization failed (code ")); - Serial.print(devStatus); - Serial.println(F(")")); - } - - // configure LED for output - pinMode(LED_PIN, OUTPUT); -} - - - -// ================================================================ -// === MAIN PROGRAM LOOP === -// ================================================================ - -void loop() { - // if programming failed, don't try to do anything - if (!dmpReady) return; - // read a packet from FIFO - if (mpu.dmpGetCurrentFIFOPacket(fifoBuffer)) { // Get the Latest packet - -#ifdef OUTPUT_READABLE_QUATERNION - // display quaternion values in easy matrix form: w x y z - mpu.dmpGetQuaternion(&q, fifoBuffer); - Serial.print("quat\t"); - Serial.print(q.w); - Serial.print("\t"); - Serial.print(q.x); - Serial.print("\t"); - Serial.print(q.y); - Serial.print("\t"); - Serial.println(q.z); -#endif - -#ifdef OUTPUT_READABLE_EULER - // display Euler angles in degrees - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetEuler(euler, &q); - Serial.print("euler\t"); - Serial.print(euler[0] * 180 / M_PI); - Serial.print("\t"); - Serial.print(euler[1] * 180 / M_PI); - Serial.print("\t"); - Serial.println(euler[2] * 180 / M_PI); -#endif - -#ifdef OUTPUT_READABLE_YAWPITCHROLL - // display Euler angles in degrees - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); - Serial.print("ypr\t"); - Serial.print(ypr[0] * 180 / M_PI); - Serial.print("\t"); - Serial.print(ypr[1] * 180 / M_PI); - Serial.print("\t"); - Serial.print(ypr[2] * 180 / M_PI); - /* - mpu.dmpGetAccel(&aa, fifoBuffer); - Serial.print("\tRaw Accl XYZ\t"); - Serial.print(aa.x); - Serial.print("\t"); - Serial.print(aa.y); - Serial.print("\t"); - Serial.print(aa.z); - mpu.dmpGetGyro(&gy, fifoBuffer); - Serial.print("\tRaw Gyro XYZ\t"); - Serial.print(gy.x); - Serial.print("\t"); - Serial.print(gy.y); - Serial.print("\t"); - Serial.print(gy.z); - */ - Serial.println(); - -#endif - -#ifdef OUTPUT_READABLE_REALACCEL - // display real acceleration, adjusted to remove gravity - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); - Serial.print("areal\t"); - Serial.print(aaReal.x); - Serial.print("\t"); - Serial.print(aaReal.y); - Serial.print("\t"); - Serial.println(aaReal.z); -#endif - -#ifdef OUTPUT_READABLE_WORLDACCEL - // display initial world-frame acceleration, adjusted to remove gravity - // and rotated based on known orientation from quaternion - mpu.dmpGetQuaternion(&q, fifoBuffer); - mpu.dmpGetAccel(&aa, fifoBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetLinearAccel(&aaReal, &aa, &gravity); - mpu.dmpGetLinearAccelInWorld(&aaWorld, &aaReal, &q); - Serial.print("aworld\t"); - Serial.print(aaWorld.x); - Serial.print("\t"); - Serial.print(aaWorld.y); - Serial.print("\t"); - Serial.println(aaWorld.z); -#endif - -#ifdef OUTPUT_TEAPOT - // display quaternion values in InvenSense Teapot demo format: - teapotPacket[2] = fifoBuffer[0]; - teapotPacket[3] = fifoBuffer[1]; - teapotPacket[4] = fifoBuffer[4]; - teapotPacket[5] = fifoBuffer[5]; - teapotPacket[6] = fifoBuffer[8]; - teapotPacket[7] = fifoBuffer[9]; - teapotPacket[8] = fifoBuffer[12]; - teapotPacket[9] = fifoBuffer[13]; - Serial.write(teapotPacket, 14); - teapotPacket[11]++; // packetCount, loops at 0xFF on purpose -#endif - - // blink LED to indicate activity - blinkState = !blinkState; - digitalWrite(LED_PIN, blinkState); - } -} diff --git a/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/MPUplane.pde b/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/MPUplane.pde deleted file mode 100644 index 7aded8f..0000000 --- a/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/MPUplane.pde +++ /dev/null @@ -1,189 +0,0 @@ -// I2C device class (I2Cdev) demonstration Processing sketch for MPU6050 DMP output -// 6/20/2012 by Jeff Rowberg -// Updates should (hopefully) always be available at https://github.com/jrowberg/i2cdevlib -// -// Changelog: -// 2012-06-20 - initial release -// 2016-10-28 - Changed to bi-plane 3d model based on tutorial at -// https://forum.processing.org/two/discussion/24350/display-obj-file-in-3d -// https://opengameart.org/content/low-poly-biplane - -/* ============================================ -I2Cdev device library code is placed under the MIT license -Copyright (c) 2012 Jeff Rowberg - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -=============================================== -*/ - -import processing.serial.*; -//import processing.opengl.*; -import toxi.geom.*; -import toxi.processing.*; - -// NOTE: requires ToxicLibs to be installed in order to run properly. -// 1. Download from https://github.com/postspectacular/toxiclibs/releases -// 2. Extract into [userdir]/Processing/libraries -// (location may be different on Mac/Linux) -// 3. Run and bask in awesomeness - -ToxiclibsSupport gfx; - -Serial port; // The serial port -char[] teapotPacket = new char[14]; // InvenSense Teapot packet -int serialCount = 0; // current packet byte position -int synced = 0; -int interval = 0; - -float[] q = new float[4]; -Quaternion quat = new Quaternion(1, 0, 0, 0); - -float[] gravity = new float[3]; -float[] euler = new float[3]; -float[] ypr = new float[3]; - - -PShape plane; // 3d model - -void setup() { - // 640x480 px square viewport - size(640, 480, P3D); - gfx = new ToxiclibsSupport(this); - - // setup lights and antialiasing - lights(); - smooth(); - - // display serial port list for debugging/clarity - println(Serial.list()); - - // get a specific serial port - String portName = "COM12"; - - // open the serial port - port = new Serial(this, portName, 115200); - - // send single character to trigger DMP init/start - // (expected by MPU6050_DMP6 example Arduino sketch) - port.write('r'); - - // Load Plane object - // The file must be in the \data folder - // of the current sketch to load successfully - plane = loadShape("biplane.obj"); - - - // apply its texture and set orientation - PImage img1=loadImage("diffuse_512.png"); - plane.setTexture(img1); - plane.scale(30); - plane.rotateX(PI); - plane.rotateY(PI+HALF_PI); - - -} - -void draw() { - if (millis() - interval > 1000) { - // resend single character to trigger DMP init/start - // in case the MPU is halted/reset while applet is running - port.write('r'); - interval = millis(); - } - - // black background - background(0); - - - // translate everything to the middle of the viewport - pushMatrix(); - translate(width / 2, height / 2); - - // toxiclibs direct angle/axis rotation from quaternion (NO gimbal lock!) - // (axis order [1, 3, 2] and inversion [-1, +1, +1] is a consequence of - // different coordinate system orientation assumptions between Processing - // and InvenSense DMP) - float[] axis = quat.toAxisAngle(); - rotate(axis[0], -axis[1], axis[3], axis[2]); - - // draw plane - shape(plane, 0, 0); - - popMatrix(); -} - -void serialEvent(Serial port) { - interval = millis(); - while (port.available() > 0) { - int ch = port.read(); - - if (synced == 0 && ch != '$') return; // initial synchronization - also used to resync/realign if needed - synced = 1; - print ((char)ch); - - if ((serialCount == 1 && ch != 2) - || (serialCount == 12 && ch != '\r') - || (serialCount == 13 && ch != '\n')) { - serialCount = 0; - synced = 0; - return; - } - - if (serialCount > 0 || ch == '$') { - teapotPacket[serialCount++] = (char)ch; - if (serialCount == 14) { - serialCount = 0; // restart packet byte position - - // get quaternion from data packet - q[0] = ((teapotPacket[2] << 8) | teapotPacket[3]) / 16384.0f; - q[1] = ((teapotPacket[4] << 8) | teapotPacket[5]) / 16384.0f; - q[2] = ((teapotPacket[6] << 8) | teapotPacket[7]) / 16384.0f; - q[3] = ((teapotPacket[8] << 8) | teapotPacket[9]) / 16384.0f; - for (int i = 0; i < 4; i++) if (q[i] >= 2) q[i] = -4 + q[i]; - - // set our toxilibs quaternion to new data - quat.set(q[0], q[1], q[2], q[3]); - - - // below calculations unnecessary for orientation only using toxilibs - - // calculate gravity vector - gravity[0] = 2 * (q[1]*q[3] - q[0]*q[2]); - gravity[1] = 2 * (q[0]*q[1] + q[2]*q[3]); - gravity[2] = q[0]*q[0] - q[1]*q[1] - q[2]*q[2] + q[3]*q[3]; - - // calculate Euler angles - euler[0] = atan2(2*q[1]*q[2] - 2*q[0]*q[3], 2*q[0]*q[0] + 2*q[1]*q[1] - 1); - euler[1] = -asin(2*q[1]*q[3] + 2*q[0]*q[2]); - euler[2] = atan2(2*q[2]*q[3] - 2*q[0]*q[1], 2*q[0]*q[0] + 2*q[3]*q[3] - 1); - - // calculate yaw/pitch/roll angles - ypr[0] = atan2(2*q[1]*q[2] - 2*q[0]*q[3], 2*q[0]*q[0] + 2*q[1]*q[1] - 1); - ypr[1] = atan(gravity[0] / sqrt(gravity[1]*gravity[1] + gravity[2]*gravity[2])); - ypr[2] = atan(gravity[1] / sqrt(gravity[0]*gravity[0] + gravity[2]*gravity[2])); - - // output various components for debugging - println("q:\t" + round(q[0]*100.0f)/100.0f + "\t" + round(q[1]*100.0f)/100.0f + "\t" + round(q[2]*100.0f)/100.0f + "\t" + round(q[3]*100.0f)/100.0f); - println("euler:\t" + euler[0]*180.0f/PI + "\t" + euler[1]*180.0f/PI + "\t" + euler[2]*180.0f/PI); - println("ypr:\t" + ypr[0]*180.0f/PI + "\t" + ypr[1]*180.0f/PI + "\t" + ypr[2]*180.0f/PI); - - } - } - } -} diff --git a/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/data/biplane.obj b/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/data/biplane.obj deleted file mode 100644 index 6867928..0000000 --- a/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/data/biplane.obj +++ /dev/null @@ -1,2239 +0,0 @@ -v 4.500000 0.176989 0.367522 -v 4.500000 0.318923 0.254332 -v 4.500000 0.397690 0.090770 -v 4.500000 0.397690 -0.090770 -v 4.500000 0.318923 -0.254333 -v 4.500000 0.176989 -0.367521 -v 4.500000 0.000000 -0.407918 -v 4.500000 -0.176989 -0.367521 -v 4.500000 -0.318923 -0.254332 -v 4.500000 -0.397691 -0.090770 -v 4.500000 -0.397691 0.090770 -v 4.500000 -0.318923 0.254333 -v 4.500001 -0.176989 0.367522 -v 4.500000 0.000000 0.407918 -v 2.700000 0.259478 0.538812 -v 2.700000 0.467563 0.372869 -v 2.700000 0.583042 0.133076 -v 2.700000 0.583042 -0.133076 -v 2.700000 0.467563 -0.372869 -v 2.700000 0.259478 -0.538812 -v 2.700000 0.000000 -0.598036 -v 2.700000 -0.259478 -0.538812 -v 2.700000 -0.467563 -0.372869 -v 2.700000 -0.583042 -0.133075 -v 2.700000 -0.583042 0.133075 -v 2.700000 -0.467563 0.372870 -v 2.700000 -0.259478 0.538812 -v 2.700000 0.000000 0.598036 -v 0.900000 0.323112 0.670950 -v 0.900000 0.582229 0.464312 -v 0.900000 0.726027 0.165711 -v 0.900000 0.726027 -0.165711 -v 0.900000 0.582229 -0.464312 -v 0.900000 0.323113 -0.670950 -v 0.900000 0.000000 -0.744698 -v 0.900000 -0.323112 -0.670950 -v 0.900000 -0.582229 -0.464312 -v 0.900000 -0.726027 -0.165711 -v 0.900000 -0.726027 0.165711 -v 0.900000 -0.582229 0.464312 -v 0.900000 -0.323113 0.670950 -v 0.900000 0.000000 0.744699 -v -0.900000 0.384390 0.798195 -v -0.900000 0.692647 0.552368 -v -0.475444 0.863717 0.197138 -v -0.475445 0.863717 -0.197138 -v -0.900000 0.692647 -0.552368 -v -0.900000 0.384390 -0.798194 -v -0.900000 0.000000 -0.885929 -v -0.900000 -0.384390 -0.798195 -v -0.900000 -0.692647 -0.552368 -v -0.900000 -0.863717 -0.197138 -v -0.900000 -0.863717 0.197138 -v -0.900000 -0.692647 0.552368 -v -0.900000 -0.384390 0.798195 -v -0.900000 0.000000 0.885929 -v -2.700000 0.433883 0.900969 -v -2.700000 0.781831 0.623490 -v -2.885778 0.974928 0.222521 -v -2.885778 0.974928 -0.222521 -v -2.700000 0.781832 -0.623490 -v -2.699999 0.433884 -0.900969 -v -2.699999 0.000000 -1.000000 -v -2.700000 -0.433883 -0.900969 -v -2.700000 -0.781831 -0.623490 -v -2.700000 -0.974928 -0.222521 -v -2.700000 -0.974928 0.222521 -v -2.700000 -0.781832 0.623489 -v -2.700000 -0.433884 0.900969 -v -2.700000 0.000000 1.000000 -v 4.500000 0.000000 -0.000000 -v -5.181942 0.000000 -0.000000 -v 5.269916 1.092397 0.090771 -v 5.269916 1.092397 -0.090770 -v 3.399458 1.972455 0.000001 -v 5.551387 0.000000 -0.000000 -v 4.141554 0.176989 1.784806 -v 4.500000 0.318923 1.235124 -v 2.700000 0.467563 1.342699 -v 3.058446 0.259478 1.802116 -v 4.500000 0.318923 -1.235123 -v 4.141554 0.176989 -1.784806 -v 3.058446 0.259478 -1.802116 -v 2.700000 0.467563 -1.342699 -v -1.300000 1.103771 0.487962 -v -1.125000 1.252653 0.195352 -v -2.475000 1.333997 0.213918 -v -2.300000 1.156989 0.519851 -v -1.125000 1.252653 -0.195351 -v -2.475000 1.333997 -0.213917 -v -1.300000 1.103772 -0.487962 -v -2.300000 1.156989 -0.519851 -v -1.799999 1.281724 0.398879 -v -1.125000 1.187470 0.380784 -v -1.800000 1.350005 0.204635 -v -2.475000 1.262618 0.416974 -v -1.800000 1.156763 0.540666 -v -1.800000 1.372766 0.000000 -v -1.125000 1.274381 0.000000 -v -1.800000 1.350006 -0.204634 -v -2.475000 1.357790 0.000000 -v -1.800000 1.281724 -0.398879 -v -1.125000 1.187470 -0.380784 -v -1.800000 1.156763 -0.540666 -v -2.475000 1.262618 -0.416974 -v -0.825593 1.004904 0.374753 -v -0.475445 0.778182 0.374753 -v -0.825593 1.069055 0.192257 -v -1.125000 0.951901 0.516854 -v -2.700000 1.105101 0.423005 -v -2.885779 0.878380 0.423006 -v -2.475000 1.021542 0.564478 -v -2.700000 1.177512 0.217012 -v -1.800000 0.963961 0.587929 -v -1.800000 0.737239 0.587929 -v -0.825593 1.090439 0.000000 -v -0.475445 0.863717 0.000000 -v -0.825593 1.069055 -0.192257 -v -2.700000 1.201650 0.000000 -v -2.885779 0.974928 0.000000 -v -2.700000 1.177513 -0.217012 -v -0.825592 1.004904 -0.374753 -v -0.475444 0.778182 -0.374753 -v -1.125000 0.951901 -0.516854 -v -1.800000 0.963961 -0.587929 -v -1.800000 0.737239 -0.587929 -v -2.475000 1.021542 -0.564478 -v -2.700000 1.105101 -0.423005 -v -2.885778 0.878380 -0.423005 -v 2.700000 0.583042 0.000000 -v 0.900000 0.726027 0.005801 -v -5.181943 -0.629401 -0.501931 -v -4.986976 -0.781831 -0.623490 -v -5.181942 -0.784850 -0.179137 -v -4.986976 -0.974928 -0.222521 -v -5.181942 -0.784850 0.179137 -v -4.986976 -0.974928 0.222521 -v -5.181942 -0.629401 0.501930 -v -4.986977 -0.781831 0.623490 -v -5.181942 -0.349291 0.725311 -v -4.986976 -0.433884 0.900969 -v -4.986976 0.000000 1.000000 -v -5.181942 0.000000 0.805034 -v -5.181942 0.629401 -0.501930 -v -4.987885 0.789991 -0.606546 -v -4.986976 0.781832 -0.623490 -v -5.181942 0.349291 -0.725310 -v -4.986977 0.433884 -0.900968 -v -4.986976 0.433884 0.900969 -v -5.181942 0.349291 0.725311 -v -4.986976 0.781831 0.623490 -v -4.987885 0.789991 0.606546 -v -5.181942 0.629401 0.501931 -v -4.986976 0.974928 0.222521 -v -5.181942 0.784301 0.179012 -v -5.181942 0.000000 -0.805034 -v -4.986976 0.000000 -1.000000 -v -5.181942 -0.349291 -0.725310 -v -4.986976 -0.433884 -0.900969 -v -5.181942 0.784301 -0.179011 -v -4.986976 0.974928 -0.222521 -v -5.181942 0.779962 0.000001 -v -4.986976 0.974928 0.000000 -vt 0.455704 0.153054 -vt 0.419776 0.128644 -vt 0.383319 0.143119 -vt 0.328896 0.143119 -vt 0.292439 0.128644 -vt 0.256511 0.153054 -vt 0.245563 0.201018 -vt 0.256511 0.248981 -vt 0.287184 0.287445 -vt 0.331509 0.308790 -vt 0.380706 0.308790 -vt 0.425031 0.287445 -vt 0.455704 0.248981 -vt 0.466652 0.201018 -vt 0.005173 0.359445 -vt 0.016095 0.354912 -vt 0.061664 0.354281 -vt 0.166522 0.327467 -vt 0.186034 0.323730 -vt 0.219371 0.310411 -vt 0.248725 0.289652 -vt 0.263886 0.273262 -vt 0.275993 0.321494 -vt 0.305445 0.321494 -vt 0.334898 0.321494 -vt 0.364351 0.321494 -vt 0.393803 0.321494 -vt 0.423256 0.321494 -vt 0.452709 0.321494 -vt 0.019054 0.449768 -vt 0.082140 0.442189 -vt 0.099276 0.445505 -vt 0.128729 0.445505 -vt 0.158182 0.445505 -vt 0.187634 0.445505 -vt 0.217087 0.445505 -vt 0.246540 0.445505 -vt 0.275993 0.445505 -vt 0.305445 0.445505 -vt 0.334898 0.445505 -vt 0.364351 0.445505 -vt 0.393803 0.445505 -vt 0.423256 0.445505 -vt 0.452709 0.445505 -vt 0.040371 0.569517 -vt 0.069824 0.569517 -vt 0.099276 0.569517 -vt 0.128729 0.569517 -vt 0.158182 0.569517 -vt 0.187634 0.569517 -vt 0.217087 0.569517 -vt 0.246540 0.569517 -vt 0.275993 0.569517 -vt 0.305445 0.569517 -vt 0.334898 0.569517 -vt 0.364351 0.569517 -vt 0.393803 0.569517 -vt 0.423256 0.569517 -vt 0.452709 0.569517 -vt 0.040371 0.693528 -vt 0.073505 0.709029 -vt 0.099276 0.685777 -vt 0.128729 0.685777 -vt 0.154500 0.709029 -vt 0.187634 0.693528 -vt 0.217087 0.693528 -vt 0.246540 0.693528 -vt 0.275993 0.693528 -vt 0.305445 0.693528 -vt 0.334898 0.693528 -vt 0.364351 0.693528 -vt 0.393803 0.693528 -vt 0.423256 0.693528 -vt 0.452709 0.693528 -vt 0.040371 0.817539 -vt 0.073505 0.802038 -vt 0.154500 0.802038 -vt 0.356107 0.180046 -vt 0.098756 0.319100 -vt 0.114003 0.445505 -vt 0.087917 0.323202 -vt 0.360587 0.109025 -vt 0.356108 0.136215 -vt 0.351628 0.109025 -vt 0.023534 0.441375 -vt 0.044323 0.425256 -vt 0.082140 0.442189 -vt 0.019054 0.449768 -vt 0.204695 0.353513 -vt 0.203181 0.378966 -vt 0.187634 0.445505 -vt 0.158182 0.445505 -vt 0.076369 0.721086 -vt 0.099276 0.709029 -vt 0.099276 0.802038 -vt 0.076369 0.789982 -vt 0.128729 0.709029 -vt 0.128729 0.802038 -vt 0.151637 0.721086 -vt 0.151637 0.789982 -vt 0.084550 0.755534 -vt 0.084550 0.709029 -vt 0.099276 0.755534 -vt 0.084550 0.802038 -vt 0.073505 0.755534 -vt 0.114003 0.755534 -vt 0.114003 0.709029 -vt 0.128729 0.755534 -vt 0.114003 0.802038 -vt 0.143455 0.755534 -vt 0.143455 0.709029 -vt 0.154500 0.755534 -vt 0.143455 0.802038 -vt 0.084550 0.693528 -vt 0.084550 0.693528 -vt 0.099276 0.693528 -vt 0.073505 0.709029 -vt 0.084550 0.817539 -vt 0.073505 0.802038 -vt 0.099276 0.817539 -vt 0.069824 0.755534 -vt 0.069824 0.755534 -vt 0.114003 0.693528 -vt 0.114003 0.693528 -vt 0.128729 0.693528 -vt 0.114003 0.817539 -vt 0.128729 0.817539 -vt 0.143455 0.693528 -vt 0.143455 0.693528 -vt 0.154500 0.709029 -vt 0.158182 0.755534 -vt 0.158182 0.755534 -vt 0.154500 0.802038 -vt 0.143455 0.817539 -vt 0.114003 0.445505 -vt 0.113487 0.569517 -vt 0.084550 0.817539 -vt 0.063450 0.938935 -vt 0.275993 0.817539 -vt 0.060733 0.120401 -vt 0.305445 0.817539 -vt 0.104650 0.099252 -vt 0.334898 0.817539 -vt 0.153395 0.099252 -vt 0.364351 0.817539 -vt 0.197313 0.120401 -vt 0.423256 0.925429 -vt 0.393803 0.817539 -vt 0.423256 0.817539 -vt 0.143455 0.817539 -vt 0.060733 0.291667 -vt 0.030341 0.253557 -vt 0.449688 0.935863 -vt 0.452709 0.817539 -vt 0.053984 0.934786 -vt 0.017895 0.932919 -vt 0.100219 0.950069 -vt 0.102123 0.931740 -vt 0.099276 0.825290 -vt 0.217087 0.817539 -vt 0.187634 0.817539 -vt 0.019494 0.206034 -vt 0.030341 0.158511 -vt 0.246540 0.817539 -vt 0.104667 0.312738 -vt 0.129023 0.201653 -vt 0.128729 0.825290 -vt 0.114003 0.817539 -vt 0.129023 0.312124 -vt 0.275993 0.931809 -vt 0.273121 0.941551 -vt 0.249411 0.941551 -vt 0.278864 0.941551 -vt 0.305445 0.931809 -vt 0.302574 0.941551 -vt 0.308316 0.941551 -vt 0.334898 0.931809 -vt 0.332027 0.941551 -vt 0.337769 0.941551 -vt 0.364351 0.931809 -vt 0.361480 0.941551 -vt 0.367222 0.941551 -vt 0.396310 0.932910 -vt 0.390932 0.941551 -vt 0.227704 0.158511 -vt 0.153378 0.312738 -vt 0.066951 0.949302 -vt 0.411698 0.969294 -vt 0.007495 0.983733 -vt 0.156937 0.931070 -vt 0.155311 0.941551 -vt 0.131609 0.941551 -vt 0.161053 0.941551 -vt 0.187634 0.931809 -vt 0.184763 0.941551 -vt 0.190506 0.941551 -vt 0.217087 0.931809 -vt 0.214216 0.941551 -vt 0.437979 0.994491 -vt 0.197313 0.291667 -vt 0.050289 0.993403 -vt 0.393883 0.992961 -vt 0.238551 0.206034 -vt 0.102156 0.941551 -vt 0.114003 0.931021 -vt 0.219958 0.941551 -vt 0.246540 0.931809 -vt 0.243669 0.941551 -vt 0.128729 0.931680 -vt 0.125850 0.941551 -vt 0.114003 0.941551 -vt 0.158299 0.939937 -vt 0.157893 0.930592 -vt 0.227704 0.253557 -vt 0.046355 0.992034 -vt 0.421247 0.969294 -vn 0.089573 0.940981 0.326392 -vn 0.089573 0.940981 0.326392 -vn 0.089573 0.940981 0.326392 -vn 0.089573 0.940981 0.326392 -vn 0.089574 0.940981 -0.326392 -vn 0.089574 0.940981 -0.326392 -vn 0.089574 0.940981 -0.326392 -vn 0.089574 0.940981 -0.326392 -vn 0.150361 -0.955640 -0.253265 -vn 0.180233 0.000001 -0.983624 -vn 0.091281 0.000000 -0.995825 -vn -0.150994 -0.690915 -0.706992 -vn 0.180233 -0.426779 -0.886214 -vn 0.091281 -0.432073 -0.897208 -vn 0.180233 -0.769028 -0.613280 -vn 0.091281 -0.778567 -0.620887 -vn 0.180233 -0.958962 -0.218877 -vn 0.091281 -0.970858 -0.221593 -vn 0.180233 -0.958962 0.218877 -vn 0.091281 -0.970858 0.221592 -vn 0.180233 -0.769028 0.613280 -vn 0.091281 -0.778567 0.620887 -vn 0.180234 -0.426778 0.886214 -vn 0.091281 -0.432072 0.897208 -vn 0.180233 -0.000000 0.983624 -vn 0.091281 0.000000 0.995825 -vn 0.150361 -0.955640 0.253265 -vn 0.016625 -0.653805 0.756481 -vn 0.079554 0.000000 -0.996831 -vn 0.079554 0.432509 -0.898113 -vn 0.079554 -0.432508 -0.898113 -vn 0.079554 -0.779353 -0.621514 -vn 0.079554 -0.971838 -0.221816 -vn 0.079554 -0.971838 0.221816 -vn 0.079554 -0.779354 0.621514 -vn 0.079554 -0.432509 0.898113 -vn 0.079554 0.000000 0.996831 -vn 0.070121 -0.432816 -0.898751 -vn 0.070121 0.000000 -0.997539 -vn 0.070121 -0.779907 -0.621955 -vn 0.070121 -0.972528 -0.221973 -vn 0.070121 -0.972528 0.221973 -vn 0.070121 -0.779907 0.621955 -vn 0.070121 -0.432816 0.898751 -vn 0.130833 0.712633 0.689229 -vn 0.130833 0.712633 0.689229 -vn 0.130833 0.712633 0.689229 -vn 0.130833 0.712633 0.689229 -vn 0.143365 0.983605 0.109401 -vn 0.143365 0.983605 0.109401 -vn 0.143365 0.983605 0.109401 -vn 0.143365 0.983605 0.109401 -vn 0.139254 0.934218 -0.328397 -vn 0.139254 0.934218 -0.328397 -vn 0.139254 0.934218 -0.328397 -vn 0.139254 0.934218 -0.328397 -vn 0.026848 -0.433727 -0.900644 -vn 0.026848 0.000000 -0.999640 -vn 0.026848 -0.781550 -0.623265 -vn 0.026848 -0.974576 -0.222441 -vn 0.026848 -0.974577 0.222441 -vn 0.026848 -0.781550 0.623265 -vn 0.026848 -0.433728 0.900644 -vn -0.064587 -0.972892 -0.222057 -vn -0.064587 -0.780199 -0.622188 -vn -0.064587 -0.972892 0.222056 -vn -0.064587 -0.780199 0.622188 -vn -0.064587 -0.432978 0.899088 -vn 0.870350 -0.485974 0.079502 -vn 1.000000 -0.000000 -0.000000 -vn 1.000000 0.000002 -0.000003 -vn 0.870349 -0.485975 -0.079503 -vn 1.000000 -0.000003 0.000000 -vn 0.733799 -0.670454 0.109683 -vn 0.733799 -0.670454 0.109683 -vn 0.082297 0.996608 0.000000 -vn 0.082297 0.996608 0.000000 -vn 0.082297 0.996608 0.000000 -vn 0.082297 0.996608 0.000000 -vn -0.842065 -0.522167 0.135162 -vn -0.842065 -0.522167 0.135162 -vn -0.842065 -0.522167 0.135162 -vn -0.842065 -0.522167 0.135162 -vn -0.057129 -0.998367 0.000000 -vn -0.057129 -0.998367 0.000000 -vn 0.733799 -0.670455 -0.109683 -vn 0.733799 -0.670455 -0.109683 -vn -0.057129 -0.998367 -0.000000 -vn -0.057129 -0.998367 -0.000000 -vn -0.045744 0.737399 -0.673906 -vn -0.842065 -0.522167 -0.135162 -vn -0.842065 -0.522167 -0.135162 -vn 0.082297 0.996608 0.000000 -vn 0.082297 0.996608 0.000000 -vn 0.082297 0.996608 0.000000 -vn 0.082297 0.996608 0.000000 -vn 0.139254 0.934218 0.328398 -vn 0.139254 0.934218 0.328398 -vn 0.139254 0.934218 0.328398 -vn 0.139254 0.934218 0.328398 -vn -0.017811 0.943260 0.331576 -vn -0.017811 0.943260 0.331576 -vn -0.017811 0.943260 0.331576 -vn -0.017811 0.943260 0.331576 -vn -0.013215 0.722929 0.690796 -vn -0.013215 0.722929 0.690796 -vn -0.013215 0.722929 0.690796 -vn -0.013215 0.722929 0.690796 -vn 0.143365 0.983605 -0.109401 -vn 0.143365 0.983605 -0.109401 -vn 0.143365 0.983605 -0.109401 -vn 0.143365 0.983605 -0.109401 -vn -0.022046 0.993630 -0.110516 -vn -0.022046 0.993630 -0.110516 -vn -0.022046 0.993630 -0.110516 -vn -0.022046 0.993630 -0.110516 -vn -0.022046 0.993630 0.110516 -vn -0.022046 0.993630 0.110516 -vn -0.022046 0.993630 0.110516 -vn -0.022046 0.993630 0.110516 -vn 0.130833 0.712634 -0.689229 -vn 0.130833 0.712634 -0.689229 -vn 0.130833 0.712634 -0.689229 -vn 0.130833 0.712634 -0.689229 -vn -0.013215 0.722930 -0.690795 -vn -0.013215 0.722930 -0.690795 -vn -0.013215 0.722930 -0.690795 -vn -0.013215 0.722930 -0.690795 -vn -0.017811 0.943260 -0.331576 -vn -0.017811 0.943260 -0.331576 -vn -0.017811 0.943260 -0.331576 -vn -0.017811 0.943260 -0.331576 -vn -0.545911 0.790429 -0.277854 -vn -0.545911 0.790429 -0.277854 -vn -0.545911 0.790429 -0.277854 -vn -0.545911 0.790429 -0.277854 -vn -0.264463 0.503333 -0.822627 -vn -0.264463 0.503333 -0.822627 -vn -0.264463 0.503333 -0.822627 -vn -0.264463 0.503333 -0.822627 -vn 0.071428 0.391121 -0.917563 -vn -0.022348 0.280539 -0.959582 -vn -0.022348 0.280539 -0.959582 -vn -0.022348 0.280539 -0.959582 -vn -0.022348 0.280539 -0.959582 -vn -0.727792 0.633269 -0.263228 -vn -0.727792 0.633269 -0.263228 -vn -0.727792 0.633269 -0.263228 -vn -0.727792 0.633270 -0.263228 -vn 0.024936 0.422951 -0.905809 -vn 0.020457 0.652869 -0.757194 -vn 0.064463 0.552835 -0.830794 -vn -0.064587 0.432978 -0.899088 -vn -0.051952 0.691351 -0.720648 -vn -0.430065 0.475818 -0.767230 -vn -0.430065 0.475818 -0.767230 -vn -0.430065 0.475818 -0.767230 -vn -0.430065 0.475818 -0.767230 -vn 0.015304 0.118231 -0.992868 -vn 0.015304 0.118231 -0.992868 -vn 0.015304 0.118231 -0.992868 -vn 0.015304 0.118231 -0.992868 -vn -0.064587 -0.432978 -0.899088 -vn -0.064587 0.000000 -0.997912 -vn -0.567759 0.818150 -0.090998 -vn -0.567759 0.818150 -0.090998 -vn -0.567759 0.818150 -0.090998 -vn -0.567759 0.818150 -0.090998 -vn -0.755415 0.654260 -0.035929 -vn -0.755415 0.654260 -0.035929 -vn -0.755415 0.654260 -0.035929 -vn -0.755415 0.654260 -0.035929 -vn 0.000000 0.900969 -0.433884 -vn -0.072505 0.898614 -0.432707 -vn -0.082933 0.960669 -0.265023 -vn 0.000000 0.964593 -0.263742 -vn -0.924988 0.164874 0.342364 -vn -0.927519 0.290707 0.234942 -vn -1.000000 -0.000000 0.000000 -vn -0.925651 0.362381 0.108856 -vn -0.924989 -0.000000 -0.379995 -vn -0.924988 -0.164873 -0.342365 -vn -0.924989 -0.297092 -0.236923 -vn -0.924989 -0.370468 -0.084556 -vn -0.924989 -0.370467 0.084557 -vn -0.924989 -0.297092 0.236923 -vn -0.924989 -0.164874 0.342363 -vn -0.924989 0.000000 0.379995 -vn -0.727792 0.633269 0.263229 -vn -0.727792 0.633269 0.263229 -vn -0.727792 0.633269 0.263229 -vn -0.727792 0.633269 0.263229 -vn -0.545911 0.790429 0.277853 -vn -0.545911 0.790429 0.277853 -vn -0.545911 0.790429 0.277853 -vn -0.545911 0.790429 0.277853 -vn -0.755415 0.654260 0.035930 -vn -0.755415 0.654260 0.035930 -vn -0.755415 0.654260 0.035930 -vn -0.755415 0.654260 0.035930 -vn -0.567759 0.818150 0.090998 -vn -0.567759 0.818150 0.090998 -vn -0.567759 0.818150 0.090998 -vn -0.567759 0.818150 0.090998 -vn -0.076076 0.997102 0.000000 -vn -0.082933 0.960669 0.265024 -vn 0.000000 0.964593 0.263742 -vn 0.000000 1.000000 0.000000 -vn -0.942446 0.334359 0.000000 -vn -0.925651 0.362381 -0.108857 -vn -0.927519 0.290707 -0.234942 -vn -0.924989 0.164874 -0.342364 -vn -0.072505 0.898614 0.432707 -vn 0.000000 0.900969 0.433884 -vn 0.070121 -0.000000 0.997539 -vn 0.026848 -0.000000 0.999640 -vn -0.064587 0.000000 0.997912 -vn 0.015304 0.118232 0.992868 -vn 0.015304 0.118232 0.992868 -vn 0.015304 0.118232 0.992868 -vn 0.015304 0.118232 0.992868 -vn -0.022348 0.280539 0.959583 -vn -0.022348 0.280539 0.959583 -vn -0.022348 0.280539 0.959583 -vn -0.022348 0.280539 0.959583 -vn -0.051952 0.691351 0.720648 -vn -0.064587 0.432978 0.899088 -vn 0.024936 0.422951 0.905809 -vn 0.020457 0.652869 0.757194 -vn -0.430065 0.475818 0.767230 -vn -0.430065 0.475818 0.767230 -vn -0.430065 0.475818 0.767230 -vn -0.430065 0.475818 0.767230 -vn -0.264462 0.503332 0.822628 -vn -0.264462 0.503332 0.822628 -vn -0.264462 0.503332 0.822628 -vn -0.264462 0.503332 0.822628 -vn 0.079554 0.432509 0.898113 -vn 0.081210 0.779249 0.621431 -vn 0.083582 0.756709 0.648386 -vn 0.090884 0.864154 0.494952 -vn 0.074379 0.588458 0.805099 -vn 0.299258 0.416890 0.858282 -vn 0.299258 0.416890 0.858282 -vn 0.299258 0.416890 0.858282 -vn 0.299258 0.416890 0.858282 -vn 0.502967 0.815394 0.286628 -vn 0.502967 0.815394 0.286628 -vn 0.502967 0.815394 0.286628 -vn 0.502967 0.815394 0.286628 -vn 0.296862 0.477629 0.826888 -vn 0.296862 0.477629 0.826888 -vn 0.296862 0.477629 0.826888 -vn 0.296862 0.477629 0.826888 -vn 0.071428 0.391121 0.917564 -vn 0.064463 0.552834 0.830794 -vn 0.070946 0.105332 0.991903 -vn 0.070946 0.105332 0.991903 -vn 0.115643 0.269922 0.955913 -vn 0.115643 0.269922 0.955913 -vn 0.115643 0.269922 0.955913 -vn 0.115643 0.269922 0.955913 -vn 0.083582 0.756710 -0.648386 -vn 0.090884 0.864154 -0.494952 -vn 0.074379 0.588458 -0.805099 -vn 0.070946 0.105332 -0.991903 -vn 0.070946 0.105332 -0.991903 -vn 0.299258 0.416891 -0.858281 -vn 0.299258 0.416891 -0.858281 -vn 0.299258 0.416891 -0.858281 -vn 0.299258 0.416891 -0.858281 -vn 0.296862 0.477628 -0.826888 -vn 0.296862 0.477628 -0.826888 -vn 0.296862 0.477628 -0.826888 -vn 0.296862 0.477628 -0.826888 -vn 0.115643 0.269922 -0.955913 -vn 0.115643 0.269922 -0.955913 -vn 0.115643 0.269922 -0.955913 -vn 0.115643 0.269922 -0.955913 -vn 0.102431 0.896230 0.431601 -vn 0.102431 0.896230 0.431601 -vn 0.102431 0.896230 0.431601 -vn 0.102431 0.896230 0.431601 -vn 0.425735 0.904848 0.000000 -vn 0.425735 0.904848 0.000000 -vn 0.425735 0.904848 0.000000 -vn 0.102431 0.896230 -0.431601 -vn 0.102431 0.896230 -0.431601 -vn 0.102431 0.896230 -0.431601 -vn 0.102431 0.896230 -0.431601 -vn 0.968371 0.249514 0.000000 -vn 0.968371 0.249514 0.000000 -vn 0.968371 0.249514 0.000000 -vn 0.004416 0.060621 -0.998151 -vn 0.004416 0.060621 -0.998151 -vn 0.004416 0.060621 -0.998151 -vn 0.004416 0.060621 -0.998151 -vn -0.893202 0.449656 0.000001 -vn -0.893202 0.449656 0.000001 -vn -0.893202 0.449656 0.000001 -vn 0.004416 0.060620 0.998151 -vn 0.004416 0.060620 0.998151 -vn 0.004416 0.060620 0.998151 -vn 0.004416 0.060620 0.998151 -vn 0.043031 -0.112813 0.992684 -vn 0.043031 -0.112813 0.992684 -vn 0.043031 -0.112813 0.992684 -vn 0.043031 -0.112813 0.992684 -vn 0.043030 -0.112812 -0.992684 -vn 0.043030 -0.112812 -0.992684 -vn 0.043030 -0.112812 -0.992684 -vn 0.043030 -0.112812 -0.992684 -vn 0.524265 0.850274 0.046693 -vn 0.524265 0.850274 0.046693 -vn 0.524265 0.850274 0.046693 -vn 0.524265 0.850274 0.046693 -vn 0.521127 0.848248 -0.094347 -vn 0.521127 0.848248 -0.094347 -vn 0.521127 0.848248 -0.094347 -vn 0.521127 0.848248 -0.094347 -vn 0.521127 0.848248 0.094347 -vn 0.521127 0.848248 0.094347 -vn 0.521127 0.848248 0.094346 -vn 0.521127 0.848248 0.094347 -vn 0.090218 0.955033 0.282440 -vn 0.080965 0.951518 0.296745 -vn 0.493255 0.803255 0.333887 -vn 0.493255 0.803255 0.333887 -vn 0.493255 0.803255 0.333887 -vn 0.493255 0.803255 0.333887 -vn 0.102044 0.959117 0.263971 -vn 0.089030 0.996029 0.000000 -vn 0.079187 0.996860 0.000000 -vn 0.080989 0.952672 -0.293015 -vn 0.090239 0.956082 -0.278863 -vn 0.102059 0.960038 -0.260596 -vn 0.099608 0.995027 -0.000000 -vn 0.493255 0.803256 -0.333886 -vn 0.493255 0.803256 -0.333886 -vn 0.493255 0.803256 -0.333886 -vn 0.493255 0.803256 -0.333886 -vn 0.524265 0.850274 -0.046693 -vn 0.524265 0.850274 -0.046693 -vn 0.524265 0.850274 -0.046693 -vn 0.524265 0.850274 -0.046693 -vn 0.502968 0.815395 -0.286627 -vn 0.502968 0.815395 -0.286627 -vn 0.502968 0.815395 -0.286627 -vn 0.502968 0.815395 -0.286627 -vn -0.893202 0.449656 0.000002 -vn -0.893202 0.449656 0.000002 -vn -0.893202 0.449656 0.000002 -s off -f 77/85/1 78/86/2 79/87/3 80/88/4 -f 81/89/5 82/90/6 83/91/7 84/92/8 -s 1 -f 6/20/9 7/21/10 21/36/11 20/35/12 -f 7/21/10 8/22/13 22/37/14 21/36/11 -f 8/22/13 9/23/15 23/38/16 22/37/14 -f 9/23/15 10/24/17 24/39/18 23/38/16 -f 10/24/17 11/25/19 25/40/20 24/39/18 -f 11/25/19 12/26/21 26/41/22 25/40/20 -f 12/26/21 13/27/23 27/42/24 26/41/22 -f 13/27/23 14/28/25 28/43/26 27/42/24 -f 14/28/25 1/29/27 15/44/28 28/43/26 -f 20/35/12 21/36/11 35/51/29 34/50/30 -f 21/36/11 22/37/14 36/52/31 35/51/29 -f 22/37/14 23/38/16 37/53/32 36/52/31 -f 23/38/16 24/39/18 38/54/33 37/53/32 -f 24/39/18 25/40/20 39/55/34 38/54/33 -f 25/40/20 26/41/22 40/56/35 39/55/34 -f 26/41/22 27/42/24 41/57/36 40/56/35 -f 27/42/24 28/43/26 42/58/37 41/57/36 -f 35/51/29 36/52/31 50/67/38 49/66/39 -f 36/52/31 37/53/32 51/68/40 50/67/38 -f 37/53/32 38/54/33 52/69/41 51/68/40 -f 38/54/33 39/55/34 53/70/42 52/69/41 -f 39/55/34 40/56/35 54/71/43 53/70/42 -f 40/56/35 41/57/36 55/72/44 54/71/43 -s off -f 97/105/45 85/93/46 94/102/47 93/101/48 -f 95/103/49 86/94/50 99/107/51 98/106/52 -f 100/108/53 89/97/54 103/111/55 102/110/56 -s 1 -f 49/66/39 50/67/38 64/164/57 63/160/58 -f 50/67/38 51/68/40 65/139/59 64/164/57 -f 51/68/40 52/69/41 66/141/60 65/139/59 -f 52/69/41 53/70/42 67/143/61 66/141/60 -f 53/70/42 54/71/43 68/145/62 67/143/61 -f 54/71/43 55/72/44 69/148/63 68/145/62 -f 65/139/59 66/141/60 135/174/64 133/170/65 -f 66/141/60 67/143/61 137/177/66 135/174/64 -f 67/143/61 68/145/62 139/180/67 137/177/66 -f 68/145/62 69/148/63 141/183/68 139/180/67 -f 2/2/69 1/1/27 71/78/70 -f 3/3/71 2/2/69 71/78/70 -f 5/5/72 4/4/73 71/78/70 -f 6/6/9 5/5/72 71/78/70 -f 7/7/10 6/6/9 71/78/70 -f 8/8/13 7/7/10 71/78/70 -f 9/9/15 8/8/13 71/78/70 -f 10/10/17 9/9/15 71/78/70 -f 11/11/19 10/10/17 71/78/70 -f 12/12/21 11/11/19 71/78/70 -f 13/13/23 12/12/21 71/78/70 -f 14/14/25 13/13/23 71/78/70 -f 1/1/27 14/14/25 71/78/70 -f 1/15/27 2/16/69 78/86/74 77/85/75 -s off -f 2/16/76 16/31/77 79/87/78 78/86/79 -f 16/31/80 15/30/81 80/88/82 79/87/83 -s 1 -f 15/30/28 1/15/27 77/85/84 80/88/85 -f 5/19/72 6/20/9 82/90/86 81/89/87 -f 6/20/9 20/35/12 83/91/88 82/90/89 -f 20/35/12 19/34/90 84/92/91 83/91/92 -s off -f 19/34/93 5/19/94 81/89/95 84/92/96 -f 94/102/97 86/94/98 95/103/99 93/101/100 -f 95/103/101 87/95/102 96/104/103 93/101/104 -f 96/104/105 88/96/106 97/105/107 93/101/108 -f 99/107/109 89/97/110 100/108/111 98/106/112 -f 100/108/113 90/98/114 101/109/115 98/106/116 -f 101/109/117 87/95/118 95/103/119 98/106/120 -f 103/111/121 91/99/122 104/112/123 102/110/124 -f 104/112/125 92/100/126 105/113/127 102/110/128 -f 105/113/129 90/98/130 100/108/131 102/110/132 -f 121/127/133 90/98/134 105/113/135 128/134/136 -f 105/113/137 92/100/138 127/133/139 128/134/140 -s 1 -f 48/65/141 34/50/30 35/51/29 49/66/39 -s off -f 125/131/142 127/133/143 92/100/144 104/112/145 -f 128/134/146 129/150/147 60/167/148 121/127/149 -s 1 -f 62/161/150 61/77/151 126/132/152 48/65/141 -f 63/160/58 62/161/150 48/65/141 49/66/39 -f 148/194/153 146/213/154 61/77/151 62/161/150 -s off -f 128/134/155 127/133/156 61/77/157 129/150/158 -f 126/132/159 61/77/160 127/133/161 125/131/162 -s 1 -f 159/207/163 157/197/164 63/160/58 64/164/57 -f 133/170/65 159/207/163 64/164/57 65/139/59 -s off -f 119/126/165 101/109/166 90/98/167 121/127/168 -f 121/127/169 60/167/170 120/168/171 119/126/172 -s 1 -f 63/160/58 157/197/164 148/194/153 62/161/150 -f 129/150/173 145/190/174 161/209/175 60/167/176 -f 150/214/177 153/200/178 72/166/179 -f 153/200/178 155/186/180 72/166/179 -f 156/162/181 158/163/182 72/166/179 -f 158/163/182 132/140/183 72/166/179 -f 132/140/183 134/142/184 72/166/179 -f 134/142/184 136/144/185 72/166/179 -f 136/144/185 138/146/186 72/166/179 -f 138/146/186 140/185/187 72/166/179 -f 140/185/187 143/203/188 72/166/179 -f 143/203/188 150/214/177 72/166/179 -s off -f 110/118/189 113/120/190 59/159/191 111/137/192 -f 96/104/193 87/95/194 113/120/195 110/118/196 -f 120/168/197 59/159/198 113/120/199 119/126/200 -f 119/126/201 113/120/202 87/95/203 101/109/204 -s 1 -f 163/205/205 154/158/206 59/159/207 120/168/208 -f 155/186/180 162/169/209 72/166/179 -f 160/165/210 144/151/211 72/166/179 -f 144/151/211 147/152/212 72/166/179 -f 147/152/212 156/162/181 72/166/179 -f 154/158/206 152/138/213 111/137/214 59/159/207 -f 161/209/175 163/205/205 120/168/208 60/167/176 -f 72/166/179 162/169/209 160/165/210 -f 55/72/44 41/57/36 42/58/37 56/73/215 -f 69/148/63 55/72/44 56/73/215 70/149/216 -f 142/147/217 141/183/68 69/148/63 70/149/216 -s off -f 112/119/218 58/76/219 115/122/220 114/121/221 -f 114/121/222 97/105/223 88/96/224 112/119/225 -s 1 -f 151/155/226 149/156/227 57/75/228 58/76/229 -f 111/137/214 152/138/213 151/155/226 58/76/229 -f 149/153/227 142/147/217 70/149/216 57/154/228 -s off -f 110/118/230 111/137/231 58/76/232 112/119/233 -f 112/119/234 88/96/235 96/104/236 110/118/237 -s 1 -f 29/45/238 15/30/28 16/31/239 30/46/240 -f 42/58/37 28/43/26 15/44/28 29/59/238 -f 30/46/240 107/115/241 44/61/242 -s off -f 106/114/243 109/117/244 44/61/245 107/115/246 -f 108/116/247 86/94/248 94/102/249 106/114/250 -f 94/102/251 85/93/252 109/117/253 106/114/254 -s 1 -f 44/61/242 43/60/255 29/45/238 30/46/240 -f 43/74/255 56/73/215 42/58/37 29/59/238 -f 115/122/256 58/76/229 57/75/228 43/60/255 -f 57/154/228 70/149/216 56/73/215 43/74/255 -f 115/122/256 44/61/242 109/117/257 114/121/258 -s off -f 114/121/259 109/117/260 85/93/261 97/105/262 -s 1 -f 115/122/256 43/60/255 44/61/242 -f 33/49/263 19/34/90 20/35/12 34/50/30 -f 123/129/264 33/49/263 47/64/265 -f 48/65/141 47/64/265 33/49/263 34/50/30 -f 124/130/266 47/64/265 126/132/152 125/131/267 -s off -f 122/128/268 123/129/269 47/64/270 124/130/271 -f 124/130/272 91/99/273 103/111/274 122/128/275 -f 125/131/276 104/112/277 91/99/278 124/130/279 -s 1 -f 48/65/141 126/132/152 47/64/265 -s off -f 16/31/280 2/16/281 3/17/282 17/32/283 -f 73/81/284 74/79/285 75/80/286 -f 18/33/287 4/18/288 5/19/289 19/34/290 -f 74/84/291 73/82/292 76/83/293 -f 4/18/294 18/33/295 75/80/296 74/79/297 -f 130/135/298 75/80/299 18/33/300 -f 75/80/301 17/32/302 3/17/303 73/81/304 -f 3/3/305 71/78/306 76/83/307 73/82/308 -f 76/83/309 71/78/310 4/4/311 74/84/312 -f 108/116/313 45/62/314 117/124/315 116/123/316 -f 116/123/317 118/125/318 89/97/319 99/107/320 -f 116/123/321 99/107/322 86/94/323 108/116/324 -s 1 -f 31/47/325 30/46/240 16/31/239 17/32/326 -s off -f 106/114/327 107/115/328 45/62/329 108/116/330 -s 1 -f 107/115/241 30/46/240 31/47/325 45/62/331 -f 131/136/332 130/135/333 18/33/334 32/48/335 -f 33/49/263 32/48/335 18/33/334 19/34/90 -f 32/48/335 46/63/336 117/124/337 131/136/332 -s off -f 122/128/338 118/125/339 46/63/340 123/129/341 -f 117/124/342 46/63/343 118/125/344 116/123/345 -f 103/111/346 89/97/347 118/125/348 122/128/349 -s 1 -f 32/48/335 33/49/263 123/129/264 46/63/336 -f 131/136/332 117/124/337 45/62/331 31/47/325 -f 130/135/333 131/136/332 31/47/325 17/32/326 -s off -f 75/80/350 130/135/351 17/32/352 -s 1 -f 146/213/154 145/190/174 129/150/173 61/77/151 -f 133/170/65 132/171/183 158/172/182 159/207/163 -f 132/173/183 133/170/65 135/174/64 134/175/184 -f 134/176/184 135/174/64 137/177/66 136/178/185 -f 136/179/185 137/177/66 139/180/67 138/181/186 -f 138/182/186 139/180/67 141/183/68 140/184/187 -f 140/202/187 141/183/68 142/147/217 143/188/188 -f 143/216/188 142/147/217 149/153/227 150/199/177 -f 145/190/174 144/191/211 160/192/210 161/209/175 -f 144/193/211 146/213/154 148/194/153 147/195/212 -f 147/196/212 148/194/153 157/197/164 156/198/181 -f 150/189/177 149/156/227 151/155/226 153/215/178 -f 153/187/178 152/138/213 154/158/206 155/157/180 -f 155/204/180 154/158/206 163/205/205 162/211/209 -f 156/206/181 157/197/164 159/207/163 158/208/182 -f 161/209/175 160/210/210 162/211/209 163/205/205 -f 144/212/211 145/190/174 146/213/154 -f 151/155/226 152/138/213 153/201/178 -v -4.526886 2.025292 -6.500000 -v -4.526886 2.025292 6.500000 -v -2.453123 1.990687 -6.229743 -v -2.453123 1.990687 6.229743 -v -4.716847 1.835833 -6.500000 -v -4.716847 1.835833 6.500000 -v -2.453123 1.835833 6.229743 -v -2.453123 1.835833 -6.229743 -v -4.526886 2.025292 5.055555 -v -2.453123 1.835833 5.055555 -v -4.853122 1.835833 5.055555 -v -4.526886 2.025292 3.611111 -v -2.453123 1.990687 3.611111 -v -2.453123 1.835833 3.611111 -v -4.853122 1.835833 3.611111 -v -4.526886 2.025292 2.166667 -v -2.453123 1.835833 2.166667 -v -4.853123 1.835833 2.166667 -v -4.526886 2.025292 0.722222 -v -2.453123 1.990687 0.722222 -v -2.453123 1.835833 0.722222 -v -4.853123 1.835833 0.722222 -v -4.526886 2.025292 -0.722222 -v -2.453123 1.990687 -0.722222 -v -2.453123 1.835833 -0.722222 -v -4.853123 1.835833 -0.722222 -v -4.526886 2.025292 -2.166667 -v -2.453123 1.835833 -2.166667 -v -4.853123 1.835833 -2.166667 -v -4.526886 2.025292 -3.611112 -v -2.453123 1.990687 -3.611112 -v -2.453123 1.835833 -3.611112 -v -4.853123 1.835833 -3.611112 -v -4.526886 2.025292 -5.055555 -v -2.453123 1.835833 -5.055556 -v -4.853123 1.835833 -5.055556 -vt 0.616150 0.306151 -vt 0.610251 0.992489 -vt 0.731520 0.325838 -vt 0.725886 0.974777 -vt 0.591047 0.313683 -vt 0.585284 0.984520 -vt 0.476020 0.976054 -vt 0.481594 0.320254 -vt 0.605471 0.315123 -vt 0.599736 0.983336 -vt 0.717845 0.974434 -vt 0.723467 0.326044 -vt 0.579649 0.910291 -vt 0.724217 0.318026 -vt 0.720447 0.913504 -vt 0.472481 0.914051 -vt 0.598060 0.909419 -vt 0.578999 0.836511 -vt 0.718456 0.982458 -vt 0.730267 0.838710 -vt 0.471391 0.837979 -vt 0.722220 0.838546 -vt 0.598433 0.836444 -vt 0.579018 0.761838 -vt 0.602520 0.389018 -vt 0.723365 0.763360 -vt 0.470415 0.761959 -vt 0.598696 0.761928 -vt 0.579544 0.686680 -vt 0.476998 0.382224 -vt 0.732302 0.688095 -vt 0.471265 0.685937 -vt 0.724215 0.688011 -vt 0.599234 0.686836 -vt 0.580196 0.611444 -vt 0.725022 0.387043 -vt 0.732967 0.612676 -vt 0.471912 0.610366 -vt 0.724881 0.612612 -vt 0.599876 0.611634 -vt 0.580951 0.536288 -vt 0.584126 0.387830 -vt 0.725344 0.537251 -vt 0.472346 0.534318 -vt 0.600626 0.536533 -vt 0.582223 0.461596 -vt 0.601648 0.461993 -vt 0.733547 0.462028 -vt 0.474637 0.458282 -vt 0.725502 0.462044 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.050020 0.997007 0.058958 -vn 0.050020 0.997007 0.058958 -vn 0.050020 0.997007 0.058958 -vn 0.050020 0.997007 0.058958 -vn -0.591510 0.805815 -0.027903 -vn -0.591510 0.805815 -0.027903 -vn -0.591510 0.805815 -0.027903 -vn -0.591510 0.805815 -0.027903 -vn 0.122841 -0.067773 0.990110 -vn 0.122841 -0.067773 0.990110 -vn 0.122841 -0.067773 0.990110 -vn 0.122841 -0.067773 0.990110 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.122841 -0.067773 -0.990110 -vn 0.122841 -0.067773 -0.990110 -vn 0.122841 -0.067773 -0.990110 -vn 0.122841 -0.067773 -0.990110 -vn 0.050020 0.997006 -0.058958 -vn 0.050020 0.997007 -0.058958 -vn 0.050020 0.997007 -0.058958 -vn 0.050020 0.997007 -0.058958 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.591512 0.805814 0.027903 -vn -0.591512 0.805814 0.027903 -vn -0.591511 0.805814 0.027903 -vn -0.591512 0.805814 0.027903 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502197 0.864753 0.000000 -vn -0.502197 0.864753 0.000000 -vn -0.502197 0.864753 0.000000 -vn -0.502197 0.864753 0.000000 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.016684 0.999861 0.000000 -vn 0.016684 0.999861 0.000000 -vn 0.016684 0.999861 0.000000 -vn 0.016684 0.999861 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -s off -f 168/225/353 171/228/354 198/252/355 199/241/356 -f 164/221/357 197/258/358 198/246/359 166/224/360 -f 164/221/361 168/225/362 199/241/363 197/258/364 -f 165/218/365 169/226/366 170/227/367 167/235/368 -f 198/252/369 171/228/370 166/219/371 -f 166/230/372 171/228/373 168/225/374 164/217/375 -f 172/229/376 165/222/377 167/223/378 173/232/379 -f 167/220/380 170/227/381 173/231/382 -f 174/233/383 173/231/384 170/227/385 169/226/386 -f 172/229/387 174/233/388 169/226/389 165/222/390 -f 175/234/391 172/229/392 173/232/393 176/237/394 -f 173/231/395 177/238/396 176/236/397 -f 178/239/398 177/238/399 173/231/400 174/233/401 -f 175/234/402 178/239/403 174/233/404 172/229/405 -f 179/240/406 175/234/407 176/237/408 180/243/409 -f 176/236/410 177/238/411 180/242/412 -f 181/244/413 180/242/414 177/238/415 178/239/416 -f 179/240/417 181/244/418 178/239/419 175/234/420 -f 182/245/421 179/240/422 180/243/423 183/248/424 -f 180/242/425 184/249/426 183/247/427 -f 185/250/428 184/249/429 180/242/430 181/244/431 -f 182/245/432 185/250/433 181/244/434 179/240/435 -f 186/251/436 182/245/437 183/248/438 187/254/439 -f 183/247/440 184/249/441 188/255/442 187/253/443 -f 189/256/444 188/255/445 184/249/446 185/250/447 -f 186/251/448 189/256/449 185/250/450 182/245/451 -f 190/257/452 186/251/453 187/254/454 191/260/455 -f 187/253/456 188/255/457 191/259/458 -f 192/261/459 191/259/460 188/255/461 189/256/462 -f 190/257/463 192/261/464 189/256/465 186/251/466 -f 193/262/467 190/257/468 191/260/469 194/265/470 -f 191/259/471 195/266/472 194/264/473 -f 196/263/474 195/266/475 191/259/476 192/261/477 -f 193/262/478 196/263/479 192/261/480 190/257/481 -f 197/258/482 193/262/483 194/265/484 198/246/485 -f 194/264/486 195/266/487 198/252/488 -f 199/241/489 198/252/490 195/266/491 196/263/492 -f 197/258/493 199/241/494 196/263/495 193/262/496 -v -3.559415 -0.491252 -6.500000 -v -3.559415 -0.491252 6.500000 -v -1.485652 -0.525856 -6.229743 -v -1.485653 -0.525856 6.229743 -v -3.749376 -0.680711 -6.500000 -v -3.749376 -0.680711 6.500000 -v -1.485653 -0.680711 6.229743 -v -1.485652 -0.680711 -6.229743 -v -3.559415 -0.491252 5.055555 -v -1.485652 -0.680711 5.055555 -v -3.885653 -0.680711 5.055555 -v -3.559415 -0.491252 3.611110 -v -1.485652 -0.525856 3.611110 -v -1.485652 -0.680711 3.611110 -v -3.885652 -0.680711 3.611110 -v -3.559415 -0.491252 2.166667 -v -1.485652 -0.680711 2.166667 -v -3.885653 -0.680711 2.166667 -v -3.559415 -0.491252 0.722222 -v -1.485652 -0.525856 0.722222 -v -1.485652 -0.680711 0.722222 -v -3.885652 -0.680711 0.722222 -v -3.559416 -0.491252 -0.722223 -v -1.485652 -0.525856 -0.722222 -v -1.485652 -0.680711 -0.722222 -v -3.885653 -0.680711 -0.722223 -v -3.559416 -0.491252 -2.166667 -v -1.485652 -0.680711 -2.166667 -v -3.885653 -0.680711 -2.166667 -v -3.559415 -0.491252 -3.611112 -v -1.485652 -0.525856 -3.611111 -v -1.485652 -0.680711 -3.611111 -v -3.885653 -0.680711 -3.611111 -v -3.559415 -0.491252 -5.055556 -v -1.485652 -0.680711 -5.055556 -v -3.885652 -0.680711 -5.055556 -vt 0.878803 0.306151 -vt 0.872904 0.992489 -vt 0.994173 0.325838 -vt 0.988539 0.974777 -vt 0.853700 0.313683 -vt 0.847937 0.984520 -vt 0.738673 0.976054 -vt 0.744247 0.320254 -vt 0.868124 0.315123 -vt 0.862389 0.983336 -vt 0.980498 0.974434 -vt 0.986120 0.326044 -vt 0.842302 0.910291 -vt 0.986870 0.318026 -vt 0.983099 0.913504 -vt 0.735134 0.914051 -vt 0.860713 0.909419 -vt 0.841652 0.836511 -vt 0.981109 0.982458 -vt 0.992920 0.838710 -vt 0.734044 0.837979 -vt 0.984873 0.838546 -vt 0.861086 0.836444 -vt 0.841671 0.761838 -vt 0.865172 0.389018 -vt 0.986018 0.763360 -vt 0.733068 0.761959 -vt 0.861349 0.761928 -vt 0.842197 0.686680 -vt 0.739650 0.382224 -vt 0.994955 0.688095 -vt 0.733917 0.685937 -vt 0.986868 0.688011 -vt 0.861887 0.686836 -vt 0.842849 0.611444 -vt 0.987675 0.387043 -vt 0.995620 0.612676 -vt 0.734565 0.610366 -vt 0.987534 0.612612 -vt 0.862529 0.611634 -vt 0.843604 0.536288 -vt 0.846779 0.387830 -vt 0.987996 0.537251 -vt 0.734999 0.534318 -vt 0.863279 0.536533 -vt 0.844876 0.461596 -vt 0.864301 0.461993 -vt 0.996200 0.462028 -vt 0.737290 0.458282 -vt 0.988155 0.462044 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.050020 0.997007 0.058959 -vn 0.050020 0.997007 0.058959 -vn 0.050020 0.997006 0.058959 -vn 0.050020 0.997007 0.058959 -vn -0.591510 0.805815 -0.027903 -vn -0.591510 0.805815 -0.027903 -vn -0.591510 0.805815 -0.027903 -vn -0.591510 0.805815 -0.027903 -vn 0.122841 -0.067773 0.990110 -vn 0.122841 -0.067773 0.990110 -vn 0.122841 -0.067773 0.990110 -vn 0.122841 -0.067773 0.990110 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 0.122841 -0.067772 -0.990110 -vn 0.122841 -0.067772 -0.990110 -vn 0.122841 -0.067772 -0.990110 -vn 0.122841 -0.067772 -0.990110 -vn 0.050020 0.997007 -0.058959 -vn 0.050020 0.997007 -0.058959 -vn 0.050020 0.997007 -0.058959 -vn 0.050020 0.997007 -0.058959 -vn 1.000000 0.000000 0.000001 -vn 1.000000 0.000000 0.000001 -vn 1.000000 0.000000 0.000001 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.591510 0.805815 0.027903 -vn -0.591510 0.805815 0.027903 -vn -0.591510 0.805815 0.027903 -vn -0.591510 0.805815 0.027903 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.502195 0.864754 -0.000000 -vn -0.502195 0.864754 -0.000000 -vn -0.502195 0.864754 -0.000000 -vn -0.502195 0.864754 -0.000000 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn 0.016684 0.999861 0.000000 -vn 0.016684 0.999861 0.000000 -vn 0.016684 0.999861 0.000000 -vn 0.016684 0.999861 0.000000 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn -0.502196 0.864754 0.000000 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 0.053867 0.997117 0.053449 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 1.000000 0.000000 -0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 0.053867 0.997117 -0.053449 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -vn -0.502196 0.864754 -0.000000 -s off -f 204/275/497 207/278/498 234/302/499 235/291/500 -f 200/271/501 233/308/502 234/296/503 202/274/504 -f 200/271/505 204/275/506 235/291/507 233/308/508 -f 201/268/509 205/276/510 206/277/511 203/285/512 -f 234/302/513 207/278/514 202/269/515 -f 202/280/516 207/278/517 204/275/518 200/267/519 -f 208/279/520 201/272/521 203/273/522 209/282/523 -f 203/270/524 206/277/525 209/281/526 -f 210/283/527 209/281/528 206/277/529 205/276/530 -f 208/279/531 210/283/532 205/276/533 201/272/534 -f 211/284/535 208/279/536 209/282/537 212/287/538 -f 209/281/539 213/288/540 212/286/541 -f 214/289/542 213/288/543 209/281/544 210/283/545 -f 211/284/546 214/289/547 210/283/548 208/279/549 -f 215/290/550 211/284/551 212/287/552 216/293/553 -f 212/286/554 213/288/555 216/292/556 -f 217/294/557 216/292/558 213/288/559 214/289/560 -f 215/290/561 217/294/562 214/289/563 211/284/564 -f 218/295/565 215/290/566 216/293/567 219/298/568 -f 216/292/569 220/299/570 219/297/571 -f 221/300/572 220/299/573 216/292/574 217/294/575 -f 218/295/576 221/300/577 217/294/578 215/290/579 -f 222/301/580 218/295/581 219/298/582 223/304/583 -f 219/297/584 220/299/585 224/305/586 223/303/587 -f 225/306/588 224/305/589 220/299/590 221/300/591 -f 222/301/592 225/306/593 221/300/594 218/295/595 -f 226/307/596 222/301/597 223/304/598 227/310/599 -f 223/303/600 224/305/601 227/309/602 -f 228/311/603 227/309/604 224/305/605 225/306/606 -f 226/307/607 228/311/608 225/306/609 222/301/610 -f 229/312/611 226/307/612 227/310/613 230/315/614 -f 227/309/615 231/316/616 230/314/617 -f 232/313/618 231/316/619 227/309/620 228/311/621 -f 229/312/622 232/313/623 228/311/624 226/307/625 -f 233/308/626 229/312/627 230/315/628 234/296/629 -f 230/314/630 231/316/631 234/302/632 -f 235/291/633 234/302/634 231/316/635 232/313/636 -f 233/308/637 235/291/638 232/313/639 229/312/640 -v -4.142218 0.492005 -0.689421 -v -4.278798 0.483220 -0.711072 -v -4.229631 0.565988 -0.611412 -v -4.039907 1.892682 -1.903144 -v -4.176487 1.883898 -1.924795 -v -4.127320 1.966665 -1.825134 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn 0.159359 -0.653124 -0.740293 -vn 0.159359 -0.653124 -0.740293 -vn 0.159359 -0.653124 -0.740293 -vn 0.159359 -0.653124 -0.740293 -vn -0.933302 0.271664 0.234831 -vn -0.933302 0.271664 0.234831 -vn -0.933302 0.271664 0.234831 -vn -0.933302 0.271664 0.234831 -vn 0.773945 0.381464 0.505464 -vn 0.773945 0.381464 0.505464 -vn 0.773945 0.381464 0.505464 -vn 0.773945 0.381464 0.505464 -s off -f 236/317/641 237/318/642 240/322/643 239/321/644 -f 237/318/645 238/319/646 241/323/647 240/322/648 -f 238/319/649 236/320/650 239/324/651 241/323/652 -v -3.239272 0.526544 -0.759048 -v -3.375609 0.514178 -0.780479 -v -3.327950 0.606955 -0.689259 -v -3.143238 1.854496 -2.131890 -v -3.279576 1.842130 -2.153321 -v -3.231915 1.934906 -2.062101 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn 0.171460 -0.714084 -0.678738 -vn 0.171460 -0.714084 -0.678738 -vn 0.171460 -0.714084 -0.678738 -vn 0.171460 -0.714084 -0.678738 -vn -0.937813 0.279982 0.205223 -vn -0.937813 0.279982 0.205223 -vn -0.937813 0.279982 0.205223 -vn -0.937813 0.279982 0.205223 -vn 0.766343 0.434134 0.473546 -vn 0.766343 0.434134 0.473546 -vn 0.766343 0.434134 0.473546 -vn 0.766343 0.434134 0.473546 -s off -f 242/325/653 243/326/654 246/330/655 245/329/656 -f 243/326/657 244/327/658 247/331/659 246/330/660 -f 244/327/661 242/328/662 245/332/663 247/331/664 -v -3.163166 -0.512404 -4.366673 -v -3.288760 -0.570938 -4.366673 -v -3.225963 -0.541671 -4.246673 -v -4.291037 1.907626 -4.366673 -v -4.416630 1.849092 -4.366673 -v -4.353833 1.878359 -4.246673 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn 0.000000 -0.000001 -1.000000 -vn 0.000000 -0.000001 -1.000000 -vn 0.000000 -0.000001 -1.000000 -vn 0.000000 -0.000001 -1.000000 -vn -0.784961 -0.365836 0.500000 -vn -0.784961 -0.365836 0.500000 -vn -0.784961 -0.365836 0.500000 -vn -0.784961 -0.365836 0.500000 -vn 0.784961 0.365837 0.500000 -vn 0.784961 0.365837 0.500000 -vn 0.784961 0.365837 0.500000 -vn 0.784961 0.365837 0.500000 -s off -f 248/333/665 249/334/666 252/338/667 251/337/668 -f 249/334/669 250/335/670 253/339/671 252/338/672 -f 250/335/673 248/336/674 251/340/675 253/339/676 -v -2.090913 -0.552991 -4.366673 -v -2.216506 -0.611525 -4.366673 -v -2.153710 -0.582258 -4.246673 -v -3.269892 1.976702 -4.366673 -v -3.395485 1.918168 -4.366673 -v -3.332688 1.947435 -4.246673 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn -0.000005 0.000000 -1.000000 -vn -0.000005 0.000000 -1.000000 -vn -0.000005 0.000000 -1.000000 -vn -0.000005 0.000000 -1.000000 -vn -0.784960 -0.365836 0.500001 -vn -0.784960 -0.365836 0.500001 -vn -0.784960 -0.365836 0.500001 -vn -0.784960 -0.365836 0.500001 -vn 0.784962 0.365835 0.499999 -vn 0.784962 0.365835 0.499999 -vn 0.784962 0.365835 0.499999 -vn 0.784962 0.365835 0.499999 -s off -f 254/341/677 255/342/678 258/346/679 257/345/680 -f 255/342/681 256/343/682 259/347/683 258/346/684 -f 256/343/685 254/344/686 257/348/687 259/347/688 -v -4.142218 0.492005 0.689421 -v -4.278798 0.483220 0.711072 -v -4.229631 0.565988 0.611412 -v -4.039907 1.892682 1.903144 -v -4.176487 1.883898 1.924795 -v -4.127320 1.966665 1.825134 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn -0.159359 0.653124 -0.740293 -vn -0.159359 0.653124 -0.740293 -vn -0.159359 0.653124 -0.740293 -vn -0.159359 0.653124 -0.740293 -vn 0.933302 -0.271664 0.234831 -vn 0.933302 -0.271664 0.234831 -vn 0.933302 -0.271664 0.234831 -vn 0.933302 -0.271664 0.234831 -vn -0.773945 -0.381464 0.505464 -vn -0.773945 -0.381464 0.505464 -vn -0.773945 -0.381464 0.505464 -vn -0.773945 -0.381464 0.505464 -s off -f 260/349/689 261/350/690 264/354/691 263/353/692 -f 261/350/693 262/351/694 265/355/695 264/354/696 -f 262/351/697 260/352/698 263/356/699 265/355/700 -v -3.239272 0.526544 0.759048 -v -3.375609 0.514178 0.780479 -v -3.327950 0.606955 0.689259 -v -3.143239 1.854496 2.131890 -v -3.279576 1.842130 2.153321 -v -3.231915 1.934906 2.062101 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn -0.171462 0.714082 -0.678739 -vn -0.171462 0.714082 -0.678739 -vn -0.171462 0.714082 -0.678739 -vn -0.171462 0.714082 -0.678739 -vn 0.937813 -0.279982 0.205223 -vn 0.937813 -0.279982 0.205223 -vn 0.937813 -0.279982 0.205223 -vn 0.937813 -0.279982 0.205223 -vn -0.766344 -0.434134 0.473546 -vn -0.766344 -0.434133 0.473546 -vn -0.766344 -0.434134 0.473546 -vn -0.766344 -0.434133 0.473546 -s off -f 266/357/701 267/358/702 270/362/703 269/361/704 -f 267/358/705 268/359/706 271/363/707 270/362/708 -f 268/359/709 266/360/710 269/364/711 271/363/712 -v -3.163167 -0.512404 4.366673 -v -3.288760 -0.570938 4.366673 -v -3.225963 -0.541671 4.246673 -v -4.291037 1.907626 4.366672 -v -4.416630 1.849092 4.366673 -v -4.353833 1.878359 4.246673 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn 0.000000 -0.000001 -1.000000 -vn 0.000000 -0.000001 -1.000000 -vn 0.000000 -0.000001 -1.000000 -vn 0.000000 -0.000001 -1.000000 -vn 0.784961 0.365836 0.500000 -vn 0.784961 0.365836 0.500000 -vn 0.784961 0.365836 0.500000 -vn 0.784961 0.365836 0.500000 -vn -0.784963 -0.365836 0.499998 -vn -0.784963 -0.365836 0.499998 -vn -0.784963 -0.365836 0.499998 -vn -0.784963 -0.365836 0.499998 -s off -f 272/365/713 273/366/714 276/370/715 275/369/716 -f 273/366/717 274/367/718 277/371/719 276/370/720 -f 274/367/721 272/368/722 275/372/723 277/371/724 -v -2.090913 -0.552991 4.366673 -v -2.216506 -0.611525 4.366673 -v -2.153710 -0.582258 4.246673 -v -3.269892 1.976702 4.366673 -v -3.395485 1.918168 4.366673 -v -3.332688 1.947435 4.246673 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn 0.000005 0.000000 -1.000000 -vn 0.000005 0.000000 -1.000000 -vn 0.000005 0.000000 -1.000000 -vn 0.000005 0.000000 -1.000000 -vn 0.784961 0.365837 0.499999 -vn 0.784961 0.365837 0.499999 -vn 0.784961 0.365837 0.499999 -vn 0.784961 0.365837 0.499999 -vn -0.784962 -0.365835 0.500000 -vn -0.784962 -0.365835 0.500000 -vn -0.784962 -0.365835 0.500000 -vn -0.784962 -0.365835 0.500000 -s off -f 278/373/725 279/374/726 282/378/727 281/377/728 -f 279/374/729 280/375/730 283/379/731 282/378/732 -f 280/375/733 278/376/734 281/380/735 283/379/736 -v -5.517155 0.803553 -1.563271 -v -5.487778 -0.252819 -0.145963 -v -5.274500 -0.974333 1.464671 -v -5.274499 0.952056 -1.477533 -v -5.487779 0.252819 0.145963 -v -5.517155 -0.781276 1.576133 -v -5.303876 0.252819 0.145963 -v -5.303876 -0.252819 -0.145963 -v -5.502548 0.333527 -0.821039 -v -5.374407 0.570041 -0.684488 -v -5.289107 0.544277 -0.699363 -v -5.417247 0.307763 -0.835914 -v -5.374407 -0.585636 0.675485 -v -5.502548 -0.320803 0.828386 -v -5.417247 -0.292169 0.844918 -v -5.289107 -0.557001 0.692017 -vt 0.751894 0.271249 -vt 0.688242 0.270269 -vt 0.624590 0.269288 -vt 0.742593 0.186217 -vt 0.689223 0.206617 -vt 0.636506 0.184582 -vt 0.690203 0.142965 -vt 0.723500 0.047977 -vt 0.691184 0.079313 -vt 0.659848 0.046996 -vt 0.692165 0.015661 -vt 0.715908 0.196417 -vt 0.720068 0.270759 -vt 0.716398 0.164591 -vt 0.707342 0.063645 -vt 0.707832 0.031819 -vt 0.662864 0.195599 -vt 0.656416 0.269778 -vt 0.663355 0.163773 -vt 0.675516 0.063154 -vt 0.676006 0.031328 -vn -0.990061 0.139469 -0.018114 -vn -0.822500 0.528726 0.209628 -vn 0.317694 0.344286 -0.883481 -vn -0.317702 0.592979 -0.739893 -vn 0.822500 -0.445906 -0.353075 -vn 0.990061 -0.054049 -0.129840 -vn -0.948960 0.273223 0.157558 -vn -0.948215 -0.273253 -0.161933 -vn -0.991413 -0.129753 0.016270 -vn -0.842918 -0.500011 -0.198694 -vn 0.260994 -0.414547 0.871799 -vn -0.260998 -0.547769 0.794877 -vn 0.948215 0.276863 0.155677 -vn 0.842917 0.422079 0.333676 -vn 0.948960 -0.273060 -0.157838 -vn 0.991413 0.050787 0.120506 -s 1 -f 292/393/737 293/392/738 287/384/739 284/381/740 -f 295/395/741 292/396/737 284/388/740 -f 294/394/742 295/395/741 284/388/740 287/384/739 -f 293/392/738 294/394/742 287/384/739 -f 288/385/743 293/392/738 292/393/737 285/382/744 -f 297/397/745 296/398/746 286/383/747 289/386/748 -f 290/387/749 294/394/742 293/392/738 288/385/743 -f 298/399/750 297/397/745 289/386/748 -f 291/389/751 295/395/741 294/394/742 290/387/749 -f 299/400/752 298/399/750 289/386/748 286/390/747 -f 285/391/744 292/396/737 295/395/741 291/389/751 -f 296/401/746 299/400/752 286/390/747 -f 296/398/746 297/397/745 288/385/743 285/382/744 -f 299/400/752 296/401/746 285/391/744 291/389/751 -f 298/399/750 299/400/752 291/389/751 290/387/749 -f 297/397/745 298/399/750 290/387/749 288/385/743 -v -4.728155 0.086603 0.050000 -v -4.728154 0.086603 -0.050000 -v -4.728155 0.000000 -0.100000 -v -4.728154 -0.086603 -0.050000 -v -4.728155 -0.086603 0.050000 -v -4.728154 0.000000 0.100000 -v -5.628155 0.086603 0.050000 -v -5.628154 0.086603 -0.050000 -v -5.628155 0.000000 -0.100000 -v -5.628154 -0.086603 -0.050000 -v -5.628155 -0.086603 0.050000 -v -5.628154 0.000000 0.100000 -v -5.628154 0.000000 -0.000000 -vt 0.988488 0.024988 -vt 0.988520 0.041334 -vt 0.988552 0.057679 -vt 0.988584 0.074025 -vt 0.988616 0.090371 -vt 0.988648 0.106717 -vt 0.988680 0.123062 -vt 0.841008 0.025277 -vt 0.841040 0.041623 -vt 0.841072 0.057968 -vt 0.841104 0.074314 -vt 0.841136 0.090659 -vt 0.841168 0.107005 -vt 0.841200 0.123351 -vt 0.830926 0.091661 -vt 0.830824 0.039274 -vt 0.785404 0.013169 -vt 0.740087 0.039452 -vt 0.740190 0.091839 -vt 0.785609 0.117943 -vt 0.787602 0.065552 -vn 0.000000 1.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn -0.000000 0.499997 -0.866027 -vn -0.000000 0.499997 -0.866027 -vn -0.000000 0.499997 -0.866027 -vn -0.000000 0.499997 -0.866027 -vn 0.000000 -0.499999 -0.866026 -vn 0.000000 -0.499999 -0.866026 -vn 0.000000 -0.499999 -0.866026 -vn 0.000000 -0.499999 -0.866026 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 -0.499997 0.866027 -vn 0.000000 -0.499997 0.866027 -vn 0.000000 -0.499997 0.866027 -vn 0.000000 -0.499997 0.866027 -vn 0.000000 0.499999 0.866026 -vn 0.000000 0.499999 0.866026 -vn 0.000000 0.499999 0.866026 -vn 0.000000 0.499999 0.866026 -vn -1.000000 -0.000007 -0.000005 -vn -1.000000 0.000003 -0.000002 -vn -1.000000 0.000001 -0.000002 -vn -1.000000 0.000003 0.000005 -vn -1.000000 0.000000 -0.000002 -vn -1.000000 0.000007 -0.000005 -vn -1.000000 0.000000 0.000000 -s off -f 300/402/753 301/403/754 307/410/755 306/409/756 -f 301/403/757 302/404/758 308/411/759 307/410/760 -f 302/404/761 303/405/762 309/412/763 308/411/764 -f 303/405/765 304/406/766 310/413/767 309/412/768 -f 304/406/769 305/407/770 311/414/771 310/413/772 -f 305/407/773 300/408/774 306/415/775 311/414/776 -s 1 -f 306/420/777 307/419/778 312/422/779 -f 307/419/778 308/418/780 312/422/779 -f 308/418/780 309/417/781 312/422/779 -f 309/417/781 310/416/782 312/422/779 -f 310/416/782 311/421/783 312/422/779 -f 311/421/783 306/420/777 312/422/779 -v -3.373292 -2.034549 -1.257066 -v -3.511857 -2.034549 -1.257066 -v -3.442574 -2.094549 -1.153143 -v -3.373292 -0.302498 -0.257066 -v -3.511857 -0.302498 -0.257066 -v -3.442574 -0.362498 -0.153143 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn 0.866025 0.250000 -0.433013 -vn -0.866027 0.250000 -0.433011 -vn -0.866026 0.250000 -0.433011 -vn 0.866025 0.250001 -0.433013 -vn -0.000000 -0.499999 0.866026 -vn -0.000000 -0.499999 0.866026 -s 1 -f 313/423/784 314/424/785 317/428/786 316/427/787 -f 314/424/785 315/425/788 318/429/789 317/428/786 -f 315/425/788 313/426/784 316/430/787 318/429/789 -v -3.250543 -1.665037 -1.076869 -v -3.141562 -1.815037 -1.076869 -v -3.141562 -2.000447 -1.076869 -v -3.250544 -2.150447 -1.076869 -v -3.426880 -2.207742 -1.076869 -v -3.603215 -2.150447 -1.076869 -v -3.712196 -2.000447 -1.076869 -v -3.712196 -1.815037 -1.076869 -v -3.603215 -1.665037 -1.076869 -v -3.426879 -1.607742 -1.076869 -v -3.250543 -1.665037 -1.376869 -v -3.141562 -1.815037 -1.376869 -v -3.141562 -2.000447 -1.376869 -v -3.250544 -2.150447 -1.376869 -v -3.426880 -2.207742 -1.376870 -v -3.603215 -2.150447 -1.376869 -v -3.712196 -2.000447 -1.376870 -v -3.712196 -1.815037 -1.376869 -v -3.603215 -1.665037 -1.376869 -v -3.426879 -1.607742 -1.376869 -v -3.426879 -1.907742 -1.076869 -v -3.426879 -1.907742 -1.271261 -vt 0.252891 0.122706 -vt 0.283344 0.107201 -vt 0.298868 0.076756 -vt 0.293532 0.043002 -vt 0.269375 0.018830 -vt 0.235623 0.013474 -vt 0.205170 0.028980 -vt 0.189646 0.059424 -vt 0.194982 0.093179 -vt 0.219140 0.117351 -vt 0.987153 0.141536 -vt 0.986865 0.156219 -vt 0.986578 0.170901 -vt 0.986290 0.185584 -vt 0.986003 0.200266 -vt 0.985715 0.214949 -vt 0.985428 0.229631 -vt 0.985140 0.244313 -vt 0.984853 0.258995 -vt 0.984565 0.273678 -vt 0.984278 0.288360 -vt 0.766365 0.137213 -vt 0.766077 0.151896 -vt 0.765790 0.166578 -vt 0.765503 0.181260 -vt 0.765215 0.195943 -vt 0.764927 0.210625 -vt 0.764640 0.225307 -vt 0.764352 0.239990 -vt 0.764065 0.254672 -vt 0.763777 0.269355 -vt 0.763490 0.284037 -vt 0.498215 0.317674 -vt 0.521155 0.305994 -vt 0.532848 0.283062 -vt 0.528828 0.257636 -vt 0.510632 0.239429 -vt 0.485208 0.235394 -vt 0.462269 0.247074 -vt 0.450576 0.270006 -vt 0.454595 0.295432 -vt 0.472792 0.313640 -vt 0.246228 0.069095 -vt 0.493196 0.277291 -vn 0.545745 0.751153 0.371391 -vn 0.883034 0.286915 0.371391 -vn 0.859567 0.279290 -0.427950 -vn 0.531242 0.731191 -0.427951 -vn 0.883033 -0.286916 0.371391 -vn 0.859567 -0.279291 -0.427951 -vn 0.545744 -0.751154 0.371391 -vn 0.531242 -0.731191 -0.427951 -vn -0.000000 -0.928477 0.371390 -vn -0.000000 -0.903802 -0.427952 -vn -0.545746 -0.751153 0.371391 -vn -0.531243 -0.731191 -0.427950 -vn -0.883034 -0.286914 0.371391 -vn -0.859567 -0.279289 -0.427952 -vn -0.883034 0.286915 0.371390 -vn -0.859567 0.279290 -0.427951 -vn -0.545745 0.751153 0.371391 -vn -0.531242 0.731191 -0.427951 -vn 0.000000 0.928477 0.371390 -vn 0.000000 0.903802 -0.427951 -vn -0.000000 -0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -s 1 -f 319/441/790 320/442/791 330/453/792 329/452/793 -f 320/442/791 321/443/794 331/454/795 330/453/792 -f 321/443/794 322/444/796 332/455/797 331/454/795 -f 322/444/796 323/445/798 333/456/799 332/455/797 -f 323/445/798 324/446/800 334/457/801 333/456/799 -f 324/446/800 325/447/802 335/458/803 334/457/801 -f 325/447/802 326/448/804 336/459/805 335/458/803 -f 326/448/804 327/449/806 337/460/807 336/459/805 -f 327/449/806 328/450/808 338/461/809 337/460/807 -f 328/450/808 319/451/790 329/462/793 338/461/809 -f 320/432/791 319/431/790 339/473/810 -f 321/433/794 320/432/791 339/473/810 -f 322/434/796 321/433/794 339/473/810 -f 323/435/798 322/434/796 339/473/810 -f 324/436/800 323/435/798 339/473/810 -f 325/437/802 324/436/800 339/473/810 -f 326/438/804 325/437/802 339/473/810 -f 327/439/806 326/438/804 339/473/810 -f 328/440/808 327/439/806 339/473/810 -f 319/431/790 328/440/808 339/473/810 -f 329/471/793 330/470/792 340/474/811 -f 330/470/792 331/469/795 340/474/811 -f 331/469/795 332/468/797 340/474/811 -f 332/468/797 333/467/799 340/474/811 -f 333/467/799 334/466/801 340/474/811 -f 334/466/801 335/465/803 340/474/811 -f 335/465/803 336/464/805 340/474/811 -f 336/464/805 337/463/807 340/474/811 -f 337/463/807 338/472/809 340/474/811 -f 338/472/809 329/471/793 340/474/811 -v -3.373292 -2.034549 1.257066 -v -3.511857 -2.034549 1.257066 -v -3.442574 -2.094549 1.153143 -v -3.373292 -0.302498 0.257066 -v -3.511857 -0.302498 0.257066 -v -3.442574 -0.362498 0.153143 -vt 0.475306 0.012993 -vt 0.524059 0.012993 -vt 0.572811 0.012993 -vt 0.621564 0.012993 -vt 0.475306 0.232930 -vt 0.524059 0.232930 -vt 0.572811 0.232930 -vt 0.621564 0.232930 -vn -0.866025 -0.250000 -0.433013 -vn 0.866027 -0.249999 -0.433011 -vn 0.866026 -0.249999 -0.433011 -vn -0.866025 -0.250001 -0.433014 -vn 0.000000 0.500000 0.866025 -vn -0.000000 0.500000 0.866026 -s 1 -f 341/475/812 342/476/813 345/480/814 344/479/815 -f 342/476/813 343/477/816 346/481/817 345/480/814 -f 343/477/816 341/478/812 344/482/815 346/481/817 -v -3.250543 -1.665037 1.076869 -v -3.141562 -1.815037 1.076869 -v -3.141562 -2.000447 1.076869 -v -3.250543 -2.150447 1.076869 -v -3.426879 -2.207742 1.076869 -v -3.603214 -2.150447 1.076869 -v -3.712196 -2.000447 1.076869 -v -3.712196 -1.815037 1.076869 -v -3.603214 -1.665037 1.076869 -v -3.426879 -1.607742 1.076869 -v -3.250544 -1.665037 1.376869 -v -3.141562 -1.815037 1.376869 -v -3.141562 -2.000447 1.376869 -v -3.250544 -2.150447 1.376869 -v -3.426879 -2.207742 1.376869 -v -3.603215 -2.150447 1.376869 -v -3.712196 -2.000447 1.376869 -v -3.712196 -1.815037 1.376869 -v -3.603215 -1.665037 1.376869 -v -3.426879 -1.607742 1.376869 -v -3.426879 -1.907742 1.076869 -v -3.426879 -1.907742 1.271261 -vt 0.252891 0.122706 -vt 0.283344 0.107201 -vt 0.298868 0.076756 -vt 0.293532 0.043002 -vt 0.269375 0.018830 -vt 0.235623 0.013474 -vt 0.205170 0.028980 -vt 0.189646 0.059424 -vt 0.194982 0.093179 -vt 0.219140 0.117351 -vt 0.987153 0.141536 -vt 0.986865 0.156219 -vt 0.986578 0.170901 -vt 0.986290 0.185584 -vt 0.986003 0.200266 -vt 0.985715 0.214949 -vt 0.985428 0.229631 -vt 0.985140 0.244313 -vt 0.984853 0.258995 -vt 0.984565 0.273678 -vt 0.984278 0.288360 -vt 0.766365 0.137213 -vt 0.766077 0.151896 -vt 0.765790 0.166578 -vt 0.765503 0.181260 -vt 0.765215 0.195943 -vt 0.764927 0.210625 -vt 0.764640 0.225307 -vt 0.764352 0.239990 -vt 0.764065 0.254672 -vt 0.763777 0.269355 -vt 0.763490 0.284037 -vt 0.498215 0.317674 -vt 0.521155 0.305994 -vt 0.532848 0.283062 -vt 0.528828 0.257636 -vt 0.510632 0.239429 -vt 0.485208 0.235394 -vt 0.462269 0.247074 -vt 0.450576 0.270006 -vt 0.454595 0.295432 -vt 0.472792 0.313640 -vt 0.246228 0.069095 -vt 0.493196 0.277291 -vn -0.545745 -0.751153 0.371390 -vn -0.883034 -0.286915 0.371390 -vn -0.859567 -0.279290 -0.427951 -vn -0.531241 -0.731192 -0.427951 -vn -0.883034 0.286915 0.371390 -vn -0.859567 0.279290 -0.427952 -vn -0.545745 0.751154 0.371390 -vn -0.531240 0.731191 -0.427952 -vn 0.000000 0.928477 0.371391 -vn -0.000000 0.903802 -0.427952 -vn 0.545745 0.751153 0.371392 -vn 0.531242 0.731191 -0.427951 -vn 0.883034 0.286914 0.371391 -vn 0.859567 0.279290 -0.427951 -vn 0.883034 -0.286915 0.371391 -vn 0.859567 -0.279290 -0.427951 -vn 0.545745 -0.751154 0.371391 -vn 0.531242 -0.731191 -0.427950 -vn 0.000000 -0.928477 0.371391 -vn -0.000000 -0.903802 -0.427951 -vn -0.000000 0.000000 1.000000 -vn 0.000000 0.000000 -1.000000 -s 1 -f 347/493/818 348/494/819 358/505/820 357/504/821 -f 348/494/819 349/495/822 359/506/823 358/505/820 -f 349/495/822 350/496/824 360/507/825 359/506/823 -f 350/496/824 351/497/826 361/508/827 360/507/825 -f 351/497/826 352/498/828 362/509/829 361/508/827 -f 352/498/828 353/499/830 363/510/831 362/509/829 -f 353/499/830 354/500/832 364/511/833 363/510/831 -f 354/500/832 355/501/834 365/512/835 364/511/833 -f 355/501/834 356/502/836 366/513/837 365/512/835 -f 356/502/836 347/503/818 357/514/821 366/513/837 -f 348/484/819 347/483/818 367/525/838 -f 349/485/822 348/484/819 367/525/838 -f 350/486/824 349/485/822 367/525/838 -f 351/487/826 350/486/824 367/525/838 -f 352/488/828 351/487/826 367/525/838 -f 353/489/830 352/488/828 367/525/838 -f 354/490/832 353/489/830 367/525/838 -f 355/491/834 354/490/832 367/525/838 -f 356/492/836 355/491/834 367/525/838 -f 347/483/818 356/492/836 367/525/838 -f 357/523/821 358/522/820 368/526/839 -f 358/522/820 359/521/823 368/526/839 -f 359/521/823 360/520/825 368/526/839 -f 360/520/825 361/519/827 368/526/839 -f 361/519/827 362/518/829 368/526/839 -f 362/518/829 363/517/831 368/526/839 -f 363/517/831 364/516/833 368/526/839 -f 364/516/833 365/515/835 368/526/839 -f 365/515/835 366/524/837 368/526/839 -f 366/524/837 357/523/821 368/526/839 -v 3.068942 -0.472892 0.150000 -v 3.068942 -0.658302 0.150000 -v 2.959961 -0.808302 0.150000 -v 2.783625 -0.865597 0.150000 -v 2.607290 -0.808302 0.150000 -v 2.498308 -0.658302 0.150000 -v 2.498308 -0.472892 0.150000 -v 3.068942 -0.472892 -0.150000 -v 3.068942 -0.658302 -0.150000 -v 2.959961 -0.808302 -0.150000 -v 2.783625 -0.865597 -0.150000 -v 2.607290 -0.808302 -0.150000 -v 2.498308 -0.658302 -0.150000 -v 2.498308 -0.472892 -0.150000 -v 2.783625 -0.565597 0.150000 -v 2.783625 -0.565597 -0.044391 -vt 0.283344 0.107201 -vt 0.298868 0.076756 -vt 0.293532 0.043002 -vt 0.269375 0.018830 -vt 0.235623 0.013474 -vt 0.205170 0.028980 -vt 0.189646 0.059424 -vt 0.986865 0.156219 -vt 0.986578 0.170901 -vt 0.986290 0.185584 -vt 0.986003 0.200266 -vt 0.985715 0.214949 -vt 0.985428 0.229631 -vt 0.985140 0.244313 -vt 0.766077 0.151896 -vt 0.765790 0.166578 -vt 0.765503 0.181260 -vt 0.765215 0.195943 -vt 0.764927 0.210625 -vt 0.764640 0.225307 -vt 0.764352 0.239990 -vt 0.521155 0.305994 -vt 0.532848 0.283062 -vt 0.528828 0.257636 -vt 0.510632 0.239429 -vt 0.485208 0.235394 -vt 0.462269 0.247074 -vt 0.450576 0.270006 -vt 0.246228 0.069095 -vt 0.493196 0.277291 -vn 0.934652 0.000000 0.355563 -vn 0.883034 -0.286915 0.371391 -vn 0.859567 -0.279290 -0.427951 -vn 0.911810 0.000000 -0.410612 -vn 0.545745 -0.751153 0.371391 -vn 0.531242 -0.731191 -0.427951 -vn -0.000000 -0.928477 0.371391 -vn -0.000000 -0.903802 -0.427951 -vn -0.545745 -0.751154 0.371391 -vn -0.531241 -0.731191 -0.427951 -vn -0.883034 -0.286915 0.371391 -vn -0.859567 -0.279291 -0.427951 -vn -0.934652 0.000000 0.355563 -vn -0.911810 0.000000 -0.410612 -vn 0.000000 0.000000 1.000000 -vn 0.000000 0.186532 -0.982449 -s 1 -f 369/534/840 370/535/841 377/542/842 376/541/843 -f 370/535/841 371/536/844 378/543/845 377/542/842 -f 371/536/844 372/537/846 379/544/847 378/543/845 -f 372/537/846 373/538/848 380/545/849 379/544/847 -f 373/538/848 374/539/850 381/546/851 380/545/849 -f 374/539/850 375/540/852 382/547/853 381/546/851 -f 370/528/841 369/527/840 383/555/854 -f 371/529/844 370/528/841 383/555/854 -f 372/530/846 371/529/844 383/555/854 -f 373/531/848 372/530/846 383/555/854 -f 374/532/850 373/531/848 383/555/854 -f 375/533/852 374/532/850 383/555/854 -f 376/554/843 377/553/842 384/556/855 -f 377/553/842 378/552/845 384/556/855 -f 378/552/845 379/551/847 384/556/855 -f 379/551/847 380/550/849 384/556/855 -f 380/550/849 381/549/851 384/556/855 -f 381/549/851 382/548/853 384/556/855 diff --git a/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/data/diffuse_512.png b/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/data/diffuse_512.png deleted file mode 100644 index 930d910..0000000 Binary files a/examples/MPU6050_DMP6_using_DMP_V6v12/MPUplane/data/diffuse_512.png and /dev/null differ diff --git a/examples/MPU6050_raw/MPU6050_raw.ino b/examples/MPU6050_raw/MPU6050_raw.ino index d93ff98..e8ccb3a 100755 --- a/examples/MPU6050_raw/MPU6050_raw.ino +++ b/examples/MPU6050_raw/MPU6050_raw.ino @@ -1,12 +1,12 @@ /* - MPU6050 Raw + MPU6050 Raw - A code for obtaining raw data from the MPU6050 module with option to - modify the data output format. + A code for obtaining raw data from the MPU6050 module with option to + modify the data output format. - Find the full MPU6050 library docummentation here: - https://github.com/ElectronicCats/mpu6050/wiki - */ + Find the full MPU6050 library docummentation here: + https://github.com/ElectronicCats/mpu6050/wiki +*/ #include "I2Cdev.h" #include "MPU6050.h"