Sub Service_Create
......
Dim ps As PhoneSensors
ps.Initialize2(ps.TYPE_PRESSURE, 2)
ps.StartListening("PRESSURE")
......
End Sub
Sub PRESSURE_SensorChanged(Values() As Float)
mB = (mB * 4 + Values(0)) / 5 ' smoothing on 5 consecutive captures
End Sub