How can you manage your weight?

Health Monitor

Made by Ming Li

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

● Breadboard

● 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 fsrReading = 0;
int led1Brightness = 0;
int photoCellReading = 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
  Spark.variable("force", &fsrReading, INT);
  Spark.variable("light", &photoCellReading, INT);


}

void loop()
{
  // Use analogRead to read the photo cell reading
  // This gives us a value from 0 to 4095
  fsrReading = analogRead(fsrPin);

  // 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
   if (fsrReading < 500)
      {for (int i = 0; i < 1; i++)
       {
 // turn the pin on:
     analogWrite(led1Pin, led1Brightness);
     delay(500);
     analogWrite(led1Pin, 0);
     delay(500);
     } }


    else if ( fsrReading <1500)

     {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);



  // Use analogRead to read the photo cell reading
  // This gives us a value from 0 to 4095
  photoCellReading = analogRead(photoCellPin);

  // 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.

x
Share this Project


About

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.