{"id":2579,"date":"2022-04-28T15:47:03","date_gmt":"2022-04-28T19:47:03","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/?p=2579"},"modified":"2022-04-28T15:47:03","modified_gmt":"2022-04-28T19:47:03","slug":"smart-water-bottle-with-helpful-reminders","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/?p=2579","title":{"rendered":"Smart Water Bottle (with helpful reminders)"},"content":{"rendered":"<h2>Description:<\/h2>\n<p>This device is meant to help remind the user how much water they have in their water bottle and give them helpful suggestions to drink water throughout the day. The main functionality of the system is a water sensor made of various wire endpoints on the inside of the water bottle that conduct electricity when they come in contact with the water. This signal is then read by the microcontroller which then calculates water level based on the number of sensor readings that are high. While the resolution of this sensor is only 7, this is all that is necessary for the 7 pixel display showing the water level. In addition to this main sensor, there is also an IMU on board sensing the current acceleration of the water bottle, a buzzer, and the LED light bar. Starting with the LED light bar, this is made of 7 LED pixels that indicate various things to the user including water level and when the user needs to drink water. The IMU on board is used for detecting when the bottle is at rest and thus the water level reading will be accurate. Finally, the buzzer acts in tandem with the light bar for indicating to the user when they need to drink water. All of these components add up to a device that is effectively able to let the user know how much water is in their water bottle and when they get dehydrated.<\/p>\n<h2>Videos:<\/h2>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/1NBvkB-wH7vCBLx4u0QJscoI1E06IgPF6\/view?usp=sharing\">Digital Water Level Sensor Testing<\/a><\/p>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/1ZT3PpfIUvgNlvcZytmbUIN3fg_TiIZtM\/view?usp=sharing\">Analog Water Level Sensor Testing<\/a><\/p>\n<p><a href=\"https:\/\/drive.google.com\/file\/d\/1p2K4TS1FxK1m0sBHebKlsncyMWsfZCrG\/view?usp=sharing\">Buzzer Testing<\/a><\/p>\n<p>Final Demo<\/p>\n<h2>Images:<\/h2>\n<figure id=\"attachment_2585\" aria-describedby=\"caption-attachment-2585\" style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"size-full wp-image-2585\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0869-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2585\" class=\"wp-caption-text\">Side view of new digital water level sensor<\/figcaption><\/figure>\n<figure id=\"attachment_2586\" aria-describedby=\"caption-attachment-2586\" style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"size-full wp-image-2586\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0870-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2586\" class=\"wp-caption-text\">Side view of LED light bar indicator mounted to the side of the water bottle<\/figcaption><\/figure>\n<figure id=\"attachment_2587\" aria-describedby=\"caption-attachment-2587\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" class=\"size-full wp-image-2587\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0872-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2587\" class=\"wp-caption-text\">Image of final electronics<\/figcaption><\/figure>\n<h2>Process:<\/h2>\n<figure id=\"attachment_2580\" aria-describedby=\"caption-attachment-2580\" style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"size-full wp-image-2580\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0860-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2580\" class=\"wp-caption-text\">LED light bar used for indication of water level<\/figcaption><\/figure>\n<figure id=\"attachment_2584\" aria-describedby=\"caption-attachment-2584\" style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"size-full wp-image-2584\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0864-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2584\" class=\"wp-caption-text\">Image of original water sensor that was too small for the whole bottle<\/figcaption><\/figure>\n<figure id=\"attachment_2582\" aria-describedby=\"caption-attachment-2582\" style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"size-full wp-image-2582\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0862-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2582\" class=\"wp-caption-text\">Overall image of first prototype with original analog water sensor<\/figcaption><\/figure>\n<figure id=\"attachment_2581\" aria-describedby=\"caption-attachment-2581\" style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" class=\"size-full wp-image-2581\" src=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-scaled.jpeg\" alt=\"\" width=\"1920\" height=\"2560\" srcset=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-scaled.jpeg 1920w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-225x300.jpeg 225w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-768x1024.jpeg 768w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-1152x1536.jpeg 1152w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-1536x2048.jpeg 1536w, https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/wp-content\/uploads\/2022\/04\/IMG_0861-1200x1600.jpeg 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-2581\" class=\"wp-caption-text\">LED panel backside<\/figcaption><\/figure>\n<h2>Code:<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;Adafruit_NeoPixel.h&gt;\r\n#include &lt;Wire.h&gt;\r\n#include &lt;MPU6050.h&gt;\r\n\r\n#define NEOPIXEL_PIN  22\r\n#define WATER_PIN     19\r\n#define NUM_PIXELS    7\r\n#define SENSOR_PIN0   38\r\n#define SENSOR_PIN1   39\r\n#define SENSOR_PIN2   40\r\n#define SENSOR_PIN3   41\r\n#define SENSOR_PIN4   14\r\n#define SENSOR_PIN5   15\r\n#define SENSOR_PIN6   16\r\n\r\nint currWaterLevel = 0;\r\nint prevWaterLevel = 0;\r\n\r\nint currLightLevel = 0;\r\nint prevLightLevel = 0;\r\n\r\nint mod = (int)1024.0 \/ NUM_PIXELS;\r\nAdafruit_NeoPixel pixels(NUM_PIXELS, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);\r\n\r\nint waterSensors[7] = {SENSOR_PIN0, SENSOR_PIN1, SENSOR_PIN2, SENSOR_PIN3, SENSOR_PIN4, SENSOR_PIN5, SENSOR_PIN6};\r\n\r\n\/\/Timer Variables\r\nunsigned long waitCheckWaterLevel = 500;          \/\/Check water level every 0.5sec\r\nunsigned long waitCheckDehydration = 10000; \/\/Alert dehydration every 30 minutes\r\nunsigned long waitCheckAccel = 1000;              \/\/Update MOVING veriable after 1sec of sustained action\r\n\r\nunsigned long currTime = 0;\r\n\r\n\/\/Accelermoeter variables\r\ndouble accelThresh = 100000;\r\ndouble absAccel = 0;\r\ndouble prevAbsAccel = 0;\r\n\r\nint numDataPoints = 100;\r\n\r\nbool MOVING = false; \/\/Tracks the motion of the bottle\r\nbool PREV_MOVING = false;\r\nbool CHECK_WATER = false;\r\nbool DEHYDRATED = false;\r\nbool ACCEL_WAIT_CHECK = false;\r\n\/\/--&gt; false if bottle is stationary\r\n\/\/--&gt; true if bottle is moving\r\n\r\nint toneFreq = 349;\r\n\r\nMPU6050 mpu;\r\n\r\n\r\nvoid setup() {\r\n\r\n  Serial.begin(115200);\r\n\r\n  pixels.begin();\r\n\r\n  \/\/ Initialize MPU6050\r\n  Serial.println(\"Initialize MPU6050\");\r\n  while (!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))\r\n  {\r\n    Serial.println(\"Could not find a valid MPU6050 sensor, check wiring!\");\r\n    delay(500);\r\n  }\r\n\r\n  \/\/ If you want, you can set gyroscope offsets\r\n  mpu.setAccelOffsetX(40);\r\n  mpu.setAccelOffsetY(40);\r\n  mpu.setAccelOffsetZ(40);\r\n\r\n  \/\/ Calibrate gyroscope. The calibration must be at rest.\r\n  \/\/ If you don't want calibrate, comment this line.\r\n  mpu.calibrateGyro();\r\n\r\n  \/\/ Set threshold sensivty. Default 3.\r\n  \/\/ If you don't want use threshold, comment this line or set 0.\r\n  mpu.setThreshold(3);\r\n\r\n  \/\/ Check settings\r\n  checkSettings();\r\n\r\n}\r\n\r\nvoid loop() {\r\n  \/\/Read sensors\r\n  Vector rawGyro = mpu.readRawGyro();\r\n  currTime = millis();\r\n\r\n  double x = rawGyro.XAxis;\r\n  double y = rawGyro.YAxis;\r\n  double z = rawGyro.ZAxis;\r\n\r\n  absAccel = sqrt(x * x + y * y + z * z);\r\n  absAccel = updateAccel(absAccel);\r\n\r\n  currWaterLevel = readWaterLevel();\r\n\r\n  checkMoving(absAccel);\r\n  checkDehydrated();\r\n\r\n  if (!MOVING &amp;&amp; !DEHYDRATED) {\r\n    showWaterLevel(currWaterLevel);\r\n  }\r\n  \r\n\r\n  if (DEHYDRATED) {\r\n    static unsigned long tStart = 0;\r\n    static bool FLASH = true;\r\n    if ((currTime - tStart) &gt; 500) {\r\n      pixels.clear();\r\n      if (FLASH) {\r\n        for (int i = 0; i &lt; NUM_PIXELS; i++) {\r\n          pixels.setPixelColor(i, pixels.Color(100, 0, 0));\r\n        }\r\n        FLASH = false;\r\n        tone(12, toneFreq);\r\n        \r\n      }\r\n      else {\r\n        Serial.print(\"Hi\");\r\n        for (int i = 0; i &lt; NUM_PIXELS; i++) {\r\n          pixels.setPixelColor(i, pixels.Color(0, 0, 0));\r\n        }\r\n        FLASH = true;\r\n        tone(12, 0);\r\n      }\r\n      pixels.show();\r\n      tStart = currTime;\r\n      Serial.print(FLASH);\r\n    }\r\n    \r\n  }\r\n\r\n  prevWaterLevel = currWaterLevel;\r\n  prevAbsAccel = absAccel;\r\n  PREV_MOVING = MOVING;\r\n\r\n  Serial.println();\r\n}\r\n\r\nint readWaterLevel() {\r\n  int waterLevel = 0;\r\n\r\n  for (int i = 0; i &lt; sizeof(waterSensors) \/ sizeof(waterSensors[0]); i++) {\r\n    waterLevel += digitalRead(waterSensors[i]);\r\n  }\r\n\r\n  return waterLevel;\r\n}\r\n\r\nvoid showWaterLevel(int level) {\r\n  pixels.clear();\r\n  for (int i = 0; i &lt; level; i++) {\r\n    pixels.setPixelColor(i, pixels.Color(0, 0, 50));\r\n  }\r\n  pixels.show();\r\n}\r\n\r\nvoid checkMoving(double accel) {\r\n  static unsigned long prevCheckTime = 0;\r\n\r\n  bool ACCEL_WAIT_CHECK = false;\r\n  bool ABOVE_THRESH = absAccel &gt; accelThresh;\r\n\r\n  \/\/Start timer for passing absAccel thresh\r\n  if (MOVING &amp;&amp; ABOVE_THRESH || !MOVING &amp;&amp; !ABOVE_THRESH) {\r\n    \r\n    ACCEL_WAIT_CHECK = abs(currTime - prevCheckTime) &lt; waitCheckAccel;\r\n  }\r\n  else {\r\n    prevCheckTime = currTime;\r\n    ACCEL_WAIT_CHECK = false;\r\n  }\r\n\r\n  \/\/Only update MOVING if timer is up\r\n  if (ACCEL_WAIT_CHECK) {\r\n    MOVING = !ABOVE_THRESH;\r\n  }\r\n\r\n}\r\n\r\nvoid checkDehydrated() {\r\n  static unsigned long prevCheckTime = 0;\r\n\r\n  if (!DEHYDRATED) {\r\n    DEHYDRATED = abs(currTime - prevCheckTime) &gt; waitCheckDehydration;\r\n  }\r\n  else if (prevWaterLevel &lt; currWaterLevel || PREV_MOVING != MOVING) {\r\n    DEHYDRATED = false;\r\n  }\r\n  else {\r\n    prevCheckTime = currTime;\r\n  }\r\n}\r\n\r\ndouble updateAccel(double newReading) {\r\n  static double dataArray[100];\r\n\r\n  double sum = 0;\r\n\r\n  for (int i = numDataPoints - 1; i &gt;= 0; i--) {\r\n    if (i == 0) {\r\n      dataArray[i] = newReading;\r\n    }\r\n    else {\r\n      dataArray[i] = dataArray[i - 1];\r\n    }\r\n    sum += dataArray[i];\r\n  }\r\n  sum = sum \/ numDataPoints;\r\n  return sum;\r\n}\r\n\r\nvoid checkSettings()\r\n{\r\n  \/\/  Serial.println();\r\n\r\n  Serial.print(\" * Sleep Mode:        \");\r\n  Serial.println(mpu.getSleepEnabled() ? \"Enabled\" : \"Disabled\");\r\n\r\n  Serial.print(\" * Clock Source:      \");\r\n  switch (mpu.getClockSource())\r\n  {\r\n    case MPU6050_CLOCK_KEEP_RESET:     Serial.println(\"Stops the clock and keeps the timing generator in reset\"); break;\r\n    case MPU6050_CLOCK_EXTERNAL_19MHZ: Serial.println(\"PLL with external 19.2MHz reference\"); break;\r\n    case MPU6050_CLOCK_EXTERNAL_32KHZ: Serial.println(\"PLL with external 32.768kHz reference\"); break;\r\n    case MPU6050_CLOCK_PLL_ZGYRO:      Serial.println(\"PLL with Z axis gyroscope reference\"); break;\r\n    case MPU6050_CLOCK_PLL_YGYRO:      Serial.println(\"PLL with Y axis gyroscope reference\"); break;\r\n    case MPU6050_CLOCK_PLL_XGYRO:      Serial.println(\"PLL with X axis gyroscope reference\"); break;\r\n    case MPU6050_CLOCK_INTERNAL_8MHZ:  Serial.println(\"Internal 8MHz oscillator\"); break;\r\n  }\r\n\r\n  \/\/  Serial.print(\" * Gyroscope:         \");\r\n  switch (mpu.getScale())\r\n  {\r\n    case MPU6050_SCALE_2000DPS:        Serial.println(\"2000 dps\"); break;\r\n    case MPU6050_SCALE_1000DPS:        Serial.println(\"1000 dps\"); break;\r\n    case MPU6050_SCALE_500DPS:         Serial.println(\"500 dps\"); break;\r\n    case MPU6050_SCALE_250DPS:         Serial.println(\"250 dps\"); break;\r\n  }\r\n\r\n  Serial.print(\" * Gyroscope offsets: \");\r\n  Serial.print(mpu.getGyroOffsetX());\r\n  Serial.print(\" \/ \");\r\n  Serial.print(mpu.getGyroOffsetY());\r\n  Serial.print(\" \/ \");\r\n  Serial.println(mpu.getGyroOffsetZ());\r\n\r\n  Serial.println();\r\n}<\/pre>\n<h2>Electrical Schematic:<\/h2>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description: This device is meant to help remind the user how much water they have in their water bottle and give them helpful suggestions to drink water throughout the day. The main functionality of the system is a water sensor made of various wire endpoints on the inside of the water bottle that conduct electricity &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/?p=2579\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Smart Water Bottle (with helpful reminders)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":30,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=\/wp\/v2\/posts\/2579"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=\/wp\/v2\/users\/30"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2579"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=\/wp\/v2\/posts\/2579\/revisions"}],"predecessor-version":[{"id":2588,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=\/wp\/v2\/posts\/2579\/revisions\/2588"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/48-339\/s2022\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}