Python Forum

Full Version: Mathematical Conversion Scripts for Weather Station
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just to close this thread - I used the following code and now things are formatting properly -

bmpPress = bmp280.read_pressure()/1000
Pressin = bmpPress* .29530
print 'Pressure = \t{0:0.2f} in'.format(Pressin)
The pressure being read in as an integer not a floating point number. So you have to convert it hence divide by 1000.
Help provided by a knowledgeable local friend -
And I was repeating the same from the start...
(Jun-18-2020, 07:13 PM)buran Wrote: [ -> ]It's 3 places off i.e. I think it's 1000 higher, so I guess you misinterpret the data you read in what measurment
Pages: 1 2