-
11Bonus Round #3: Improve Your Fitness, Improve Your Finances!
The best long-term investment you can make is to take care of your health. A healthy life can lead to fewer expenses with medicines, health insurance and miracle diets, which can lead to a happier and more economically stable life.
In this step I show you how to turn your smart wallet into a step counter, capable of recording your physical activity. This can motivate you to reach greater distances and save a few cents on each step. Registered data will be sent to Thingspeak, so your data will be securely stored and available for other devices.
There are a lot of datalogging services available for communicating a microcontroller to the web. With those services you can upload/download data to/from the cloud, and do a lot of cool stuff. Take a look on my tutorial on how to use an Arduino + ESP8266 to send data from a mini-weather station for Thinkgspeak for instance (link).
Create Thingspeak Channel
- Sign in at https://thingspeak.com/
- Click Channels > New chanell add create a channel named "Step counter". It will create a database, and we will use it store the number of steps every now and then.
- Click Keys > Write key and copy your key value.
Download the Arduino code and open it on the Arduino IDE. Update the parameters (Thingspeak key, WiFi router SSID and password, Google spreadsheet ID and password, etc.), and upload the code to the ESP32. You might also need to change the sensibility of the accelerometer on the code for a better step count.
Your IoT wallet will now be able to measure the number of steps you've taken in a given time, and send it to the cloud. This way you'll be able to plot some fancy graphs and even use those values to driver other events.
Notice your IoT wallet will now consume a lot of battery. It will have to keep the microcontroller and the accelerometer always on. You might periodically turn off the WiFi module to save some battery, and increase the time between synchronizations with the cloud.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.