What is Habitica?
"Habitica is a free habit building and productivity app that treats your real life like a game."
You enter your to-do items, daily tasks, the habits you want to strengthen or avoid. You tell it when you do an item using the website or one of their mobile apps. You earn xp and gold which is used for your in-game character.
Your in-game character improves with xp and you can buy items for your character with the earned gold.
What does the Device Do?
The device I made connects to the Habitica server, gets the user's uncompleted daily tasks, shows them on the LCD screen and shows the count on the 7-segment digit display. The user can select the task they completed and tell the server they completed that task. Then the device shows the user their current gold amount and shows the uncompleted daily tasks again.
It automatically checks the server for uncompleted daily tasks every one minute after it is last checked. The time between checks can be easily increased by increasing the value of checkServerEveryXMilliseconds variable in the sketch.
I must inform you that all the communication goes through the web app that I made and hosted on Azure.
One reason for that is Habitica API only accepts https requests. The Arduino MKR1000 can make https requests, but it didn't work with Habitica's certificate. An Arduino representative told me that the problem is with the Atmel chip.
Even if I was able to send https requests from the Arduino to the Habitica server, I wouldn't be able to handle the response using C++. My web app greatly simplifes the response which makes it possible for me to handle it in C++.
Before you Use It
Search for "//ENTER INFO" in the sketch, fill the necessary fields and you can start using it. Maximum number of daily tasks you can have is nine. Please keep your total daily task count below ten or the device won't work properly.
SECURITY WARNING: The device sends your Habitica API credentials to my web app(without https). That means your Habitica API credentials will be visible to people who can see your network traffic and me. The code of the web app that I made is on github. I won't look at or store your info. And I don't think anyone will care about getting your Habitica API credentials.
You should also know that I hosted the middleman web app on Azure, using the free tier. It goes to sleep when it's not being used for a while. That means the first request can take up to 30 seconds to complete but after the web app wakes up, it's really fast.The Video