# How can you manage your weight?

## Health Monitor

Goal It is a new kind of weighing scale which can tell you healthy level. Different weight level ( based on your age and height ,such as BMI) will make the light flash different times. The photoresistor will change it brightness according to the environment brightness, which solves a problem that people will not see the clear number from the top.

Created: January 27th, 2015

0

Goal

It is a new kind of weighing scale which can tell you healthy level. Different weight level ( based on your age and height ,such as BMI) will make the light flash different times. The photoresistor will change it brightness according to the environment brightness, which solves a problem that people will not see the clear number from the top.

The circuit includes:

● Spark Microcontroller

● Jumper Wires

● 4 1kΩ Resistor

● Two single color LED

● A Photoresistor

● A Force Sensitive Resistor

0
``````int fsrPin = A0;
int led1Pin = D0;
int photoCellPin = A3;
int led2Pin = A1;
int led1Brightness = 0;
int led2Brightness = 0;

void setup()
{
// Set up the LED for output
pinMode(led1Pin, OUTPUT);
pinMode(led2Pin, OUTPUT);
// Create a cloud variable of type integer

}

void loop()
{
// This gives us a value from 0 to 4095

// Map this value into the PWM range (0-255)
// and store as the led brightness
led1Brightness = map(fsrReading, 0, 3000, 0, 255);

// fade the LED to the desired brightness, different levels will shine different times
{for (int i = 0; i < 1; i++)
{
// turn the pin on:
analogWrite(led1Pin, led1Brightness);
delay(500);
analogWrite(led1Pin, 0);
delay(500);
} }

{for (int n = 0; n < 2; n++)
{

analogWrite(led1Pin, led1Brightness);
delay(500);
analogWrite(led1Pin, 0);
delay(500);
}}

else
{for (int c = 0; c < 3; c++)
{

analogWrite(led1Pin, led1Brightness);
delay(500);
analogWrite(led1Pin, 0);
delay(500);
} }

// wait 1/10th of a second and then loop
delay(100);

// This gives us a value from 0 to 4095

// Map this value into the PWM range (0-255)
// and store as the led brightness
led2Brightness = map(photoCellReading, 0, 4095, 0, 0);

// fade the LED to the desired brightness
analogWrite(led2Pin, led2Brightness);

// wait 1/10th of a second and then loop
delay(100);

}``````
Click to Expand
0
0

I chose IFTTT to monitor my data and report to my gmail on the internet.

For the future, I should do the more research and calculation about the health data. And try to set more detailed and scientific weight level.