Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Mathematical Conversion Scripts for Weather Station
Post: RE: Mathematical Conversion Scripts for Weather St...

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'.forma...
Mickey53usa General Coding Help 11 4,629 Jun-23-2020, 11:36 PM
    Thread: Mathematical Conversion Scripts for Weather Station
Post: RE: Mathematical Conversion Scripts for Weather St...

It would probably help is I had included the proper code snippet - print 'Pressure = \t{0:0.2f} in'.format(Pressin)So, you are stating to remove the second zero - so it would be print 'Pressure = \t ...
Mickey53usa General Coding Help 11 4,629 Jun-20-2020, 05:48 PM
    Thread: Mathematical Conversion Scripts for Weather Station
Post: RE: Mathematical Conversion Scripts for Weather St...

buran; No, I don't think that the formula in question is wrong. I say this because using a standard calculator the decimals show in the correct position. I have tracked the problem to this one little ...
Mickey53usa General Coding Help 11 4,629 Jun-20-2020, 01:56 PM
    Thread: Mathematical Conversion Scripts for Weather Station
Post: RE: Mathematical Conversion Scripts for Weather St...

OK, here is the code I have in place now - print "----------------- " if (config.BMP280_Present): bmpTemp = bmp280.read_temperature() TempF = bmpTemp* (9.0/5.0) +32.0 print 'Temperature = \t{...
Mickey53usa General Coding Help 11 4,629 Jun-18-2020, 06:02 PM
    Thread: Mathematical Conversion Scripts for Weather Station
Post: RE: Mathematical Conversion Scripts for Weather St...

if (config.BMP280_Present): bmpTemp = bmp280.read_temperature() TempF = bmpTemp* (9.0/5.0) +32.0 print 'Temperature = \t{0:0.2f} F'.format(TempF) #print 'Temperature = \t{0:0.2f} C'.format(b...
Mickey53usa General Coding Help 11 4,629 Jun-16-2020, 09:54 PM
    Thread: Mathematical Conversion Scripts for Weather Station
Post: Mathematical Conversion Scripts for Weather Statio...

New person here - new to Python. Looking for some scripts to display data in a different format. Example - take a KPa and convert and display as Inces of Mercury. I have one sample for converting Cel...
Mickey53usa General Coding Help 11 4,629 Jun-16-2020, 01:18 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020