Quantified Self in Pregnancy: Hacking an Amazon Dash button

At around 16-20 weeks of pregnancy you start to feel your baby move. It's a weird and yet amazing feeling that gets stronger week by week. Importantly you need to start to understand your baby's pattern of movement - a change or reduction in the baby's usual movement can indicate that they are unwell. I decided to use a data driven approach to figuring out what my baby's movement patterns were. Also I was really interested to know if those patterns related to any other patterns when the baby was born (such as sleep times or feed times).

I started researching how best to record the movements. I wanted it to be easy to do and also be able to track it wherever I was. My first method was to set up a Google Form and use Google Sheets to track the responses. That worked really well on my mobile phone and meant I could track on the go.

However, when I was at home and at night I needed a different option. I don't have electronic devices in my bedroom as a rule; so when I felt baby move in the night I couldn't track it on my phone. I thought it would be a great idea to have a physical button I could press that also added a row to my Google Sheet.

So I did a bit of research online and found out you could hack the £5 Amazon Dash buttons to do this. I purchased a Play-Doh Dash button (the obvious choice of Dash button) and then set to work. I should mention here that I am not a coder by trade, but I'm really good at Googling things. I found some tutorials online to help me set everything up.

I discovered Dasher on GitHub which bridges your Amazon Dash button to HTTP services. If you're looking to do something similar yourself, this is a great tool and has a really informative tutorial too on setting up the tool and editing the scripts provided.

I also followed parts of this tutorial to link the HTTP request sent from my Dash button to my Google Sheet using IFTTT's webhooks. The tutorial is slightly out of date as it still refers to the older IFTTT Maker Channel, but the concept is the same.

After a bit of bash scripting, code editing (following the tutorials) and setting up a really simple recipe on IFTTT my button was ready to go! Now I have the dash button on my bedside table. So when baby decides to start moving around at 3am I can track it.

And of course Tableau connects really easily to Google Sheets, so I can create visuals to spot patterns of movement (see the viz on Tableau Public):

baby movements chart



CONVERSATION

0 comments:

Post a Comment

Back
to top