Sending and Receiving

Sara and I made a lot of progress on TIDE this week. We have written a couple of Python programs to log the messages sent and received via Twilio. We have both of the scripts working, although we are still only working from a local server. The rest of this week, the plan is to complete all the code to handle new entries to the database so that we can get the entire SMS functionality up and running.

By researching how to execute MySQL queries in Python, we learned a lot about how the database connections and cursors work. Our biggest difficulty was with calculating the elapsed time between the sending time of the message and the receiving time of the response because we had to pull the first time from the Messages table and then perform the correct conversions to get the data in datetime format before being able to calculate the elapsed time. We finally managed to accomplish this and hopefully the rest of the coding will go without a hitch.