Skip to content

A project to make getting carb and dietary fiber information easier for diabetics

License

Notifications You must be signed in to change notification settings

Martianmellow12/Piabetes

Repository files navigation

Piabetes

Information Retrieval Software For Diabetics

Piabetes is software written to help diabetics get the information they need, even when they don't have an internet connection. By using a computer as an intermediary (RasPi works best, but it's compatible with Windows and OSX), the user can text the name of a food and an amount over SMS (which doesn't require internet on their phone), and receive carbohydrate and dietary fiber information back quickly. This also enables people without smartphones to get this information, as the information is sent as plaintext through SMS. If you have any questions regarding this software, feel free to email me at piabetes@gmail.com, or text me at (704) 769-0232.


Sending Requests

Piabetes sends several pieces of useful information back whenever you request a food. Let's go ahead and dissect one of these messages.

  • The Name

    This is the name of the food. In the event that information for the food is not available, this label will likely not be included. If you text Piabetes "Crinkle Fries", it will likely return with a certain brand of crinkle fries. This occurs to help clarify what information, and to help you be able to tell if it's correct. Sometimes the reply is a bit vague, such as if you text "Cherry Pie", it may simply return "pie". This is okay, as the information being returned is for cherry pie. If you would really like to make sure, you can request info for another type of pie, and cross check the information. Most likely, as long as the pies are different, the information will be as well.

  • The Quantity

    This is the quantity for the information returned. 30 grams of grapes will likely contain more carbs than just 10 grams, and the amount you're looking for can be requested specifically (check this part of the usage page for details). If you do not send a specific quantity, this value may vary from food to food, though the information related to it (carbs, dietary fiber) will be accurate for the quantity. If an "N/A" is received, a specific quantity was most likely omitted, and the food you requested most likely has variable size, such as a fruit. To fix this, enter a quantity, such as "12 gram:banana", or "0.4 lb:apple".

  • The Carbs

    This item shows how many carbs in the quantity shown above. This will be accurate to whatever food is listed in the name field. Whenever you're requesting a food, please enter a quantity, as this will make the carb data more accurate. Receiving an "N/A" here most likely means that there wasn't any information on this food, or the requested quantity of this item is not available.

  • The Dietary Fiber

    In some cases, diabetics can subtract the amount of dietary fiber in food from the carb count, meaning that if a slice of cake has 20 carbs, but 1 gram of dietary fiber, they would only be administered insulin for 19 carbs. This information is given for exactly that reason. As with carbs, entering a quantity with the request will make this data much more accurate. Receiving an "N/A" here most likely means that there wasn't any information on this food, or the requested quantity of this item is not available.

Information Retreival Speed

Retreiving the information from Wolfram Alpha can take some time, even on a fast internet connection. This, combined with the speed of sending texts, can start to slow down the exchange. To combat this, I have Piabetes store all requests for later use, which cuts down the Wolfram request time from 12 seconds to less than 1 second. While theres nothing I can do about texting speed, Piabetes is written to treat TextMagic as a sort of queue. You can send 10 messages to Piabetes before receiving information for the first, and you'll receive info on them all around the same time.
Current Response Time: 33 seconds
Current Response Time With Library File: 18 seconds
The speeds will continue to be improved as new versions are optimized and released

Special Thanks

I'd like to thank a few people, without whom this project would have died back at v1.0

  • Tom Dubick, for introducing me to Python and the Raspberry Pi, and for mentoring me in all things code
  • Matthew "Oscar" Kersting, my little brother and inspiration for this project
  • Dominick Pulsone, who tested the software for me even though it was useless to him (he was the reason I redesigned the query function to work more efficiently)

Without these people, Piabetes would just be some unfinished code taking up space on my hard drive

About

A project to make getting carb and dietary fiber information easier for diabetics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages