LEDRoom – Week 5 update

I have decided “Pressure” is the best feedback for metering throwing my phone up and down as it returns Pressure and Altitude in floats.

I need to measure the initial “resting” altitude, the peak altitude, and the new resting altitude so I can use math to check if it is rising or falling. I might be using millis() and maybe every odd second is x1 value and every even second is the x2 value for altitude. Then I would just check x2-x1>0 (falling) and x2-x1<0 (rising). But as I type this I don’t think odd or even is the best call…

Currently, the altitude never really stabilises and returns floats with a significant delay so I have hit a wall that I am reluctant to pass.

void pressure( float x, float y) { 
  /* how to get initial value range of phone 
  how to parse if its rising
  how to parse if its falling
  
  println("Pressure : ", x, "Altitude : ",y);
}