Take Control of Your Health With Smart Watch App!

by michalkeiserman in Circuits > Arduino

291 Views, 0 Favorites, 0 Comments

Take Control of Your Health With Smart Watch App!

IOT smart watch

Recently, we noticed that the amount of sport we do is reducing more and more with each day that is passing by...

We both are student, and also working a full time job in the same time - so you can guess the amount of "free" time we have LOL :)

Therefore, unfortunately, we stopped exercising and the effect of this on our mood and general feeling was pretty bad...

WE DECIDED TO TAKE AN ACTION - HELP OURSELVES TO WORKOUT AND HAVE A HEALTHIER LIFE STYLE!

Our app, is all about helping individuals workout with no need to go and buy yourself an expensive smart-watch or paying to a trainer...

WHAT YOU EARN by using our smart watch app?

- You can set an amount of steps you wish to make on a daily basis and it will count and make sure you know when you reach it.

- You can set a "sweating goal" so that the hygrometer will tell you if you trained well enough and reach that goal...

- you have a thermometer so you can go for an outdoor workout when the weather conditions are the most suitable (then the excuses ran out).

- lastly, when returning from outdoor training, tired and just wanting to get home already (been there, done that), the GPS detector will notify you when you are close to your home and will give you one last motivation until you arrive and finish your workout!

Technologies in Use

technologies in use.png

1. CPX - Circuit Playground Express Hardware board with neo pixels, motion sensor, GPS sensor, temperature sensor, light sensor, and much more.

we used the motion sensor (to count amount of steps), the temperature sensor (to check if the weather is suitable to work out now), the humidity sensor (to check if you sweated enough during your work out), and the GPS (to see when we are in the radios close to your home).

2. Blynk - Blynk was designed for the Internet of Things. It can control hardware remotely, it can display sensor data, it can store data, visualize it and do many other cool things. You can build a graphic interface for your project by simply dragging and dropping widgets.

Supplies, Configuration & Downloads

supplies.png

SUPPLIES:

1. CPX

2. water sensor

3. Battery Holder with 3 AAA Batteries

CONFIGURATIONS & DOWNLOADS:

1. Install Arduino IDE

2. Install Board Manager

3. Connect the esp8266 shield to playground express

4. install latest Blynk library

5. Download Blynk legacy app to smartphone

6. Create Blynk user

7. Connect playground express to computer via USB

BLYNK & ARDUINO & CPX CONFIGURATIONS

blynk settings.jpeg

1. Create new project on Blynk legacy app

2. Add the following widgets:

a) notification - pin #13 in the CPX is connected to the "notification" widget in Blynk app using the arduino "pinMode(13, OUTPUT)" declaration, and writing output to Blynk using the "Blynk.notify" function.

b) sweat level - the hygrometer is connected via cables to A0 in the CPX (the plus is connected to the Vbat and the minus is connected to the GND), so that when touching the hygrometer, analogRead(A0) function in arduino code will be called, and the value will be sent to Blynk app "value display settings" named "Sweat Level" in the widget, via V4 by the Blynk.virtualWrite(V1, water) function.

c) steps - when connecting the CPX to batteries, so that it will have electricity outside, the motion sensor will detect steps when occurred via the X direction with the CircuitPlayground.motionX() declaration . you will have two widgets for the steps:

* the "slider settings" named "step goal" for inserting the Blynk app your goal, and is connected via V2 to arduino code. it will write it to arduino using:

BLYNK_WRITE(V2) {

step_goal = param.asInt();

}

* the "Labeled Value Settings" in Blynk app, named "Steps" is connected via V3 to arduino code, so that in each change in motion, meaning each step taken, the counterSteps in the code will increase by 1, until reaching your goal and receiving the message:

if (step_count == step_goal) {
Blynk.notify("step goal reached!");

}

d) GPS - you can select a radios location so that when reached, you will receive a message in Blynk app. the "GPS Trigger Settings" named "GPS" in Blynk app, is connected to arduino to receive the value from it via V0:

BLYNK_WRITE(V0){

back_home = param.asInt();

}

when reached the radios you selected. the back_home = 1 and you will be notified:

if (((back_home == 1) and notify_stop2) or CircuitPlayground.rightButton() == 1) {
Blynk.notify("welcome back!!!"); notify_stop2 = false;

}

e) temp - the "Gauge Settings" named "Temp" in Blynk app, is connected to arduino code using V4. the CPX has it's temp sensor, that will send the data to V4 using : temp = CircuitPlayground.temperature(); and then send it to Blynk app using Blynk.virtualWrite(V4, temp);

BLYNK APP PHOTOS

Blynk pic.PNG

IDE SPECIAL CONFIGURATIONS

icon arduino1.jpg

Now, you can import the code, and run it by yourself.

You can find it in GITHUB link: https://github.com/michalKeiserman/IOT-smart-watc...

Make sure to configure your own info in the network section:

//network settings
char auth[] = "INSERT YOUR BLYNK TEMPLATE AUTHENTICATION";

char ssid[] = "INSERT YOUR WIFI NETWORK NAME";

char pass[] = "INSERT YOUR WIFI PASSWARD";

JUST DO IT....

walking outside.jpg