Any suggestions on how to change the displayed values to inch of mercury.
A multiplier(devision) somewhere in the label code? Help with formatting would be welcomed.
Vertical garden barometer
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Vertical garden barometer
What readings are you getting? Can you post your code>
- TWDM
- Posts: 53
- Joined: Sat Sep 05, 2015 9:07 am
Re: Vertical garden barometer
My clue is working fine after applying a gamma fix, images now display. I have loaded the vertical garden barometer code and it works. It displays pressure as hPa’s. I would like to display the reading as inches of Hg.
The conversation is 1 hPa = 0.0002953 inches of Hg.
I would appreciate any help with modifying the code to output inches of
Hg to three decimal places. This is the out put of an analog barometer.
Thanks for any help.
The conversation is 1 hPa = 0.0002953 inches of Hg.
I would appreciate any help with modifying the code to output inches of
Hg to three decimal places. This is the out put of an analog barometer.
Thanks for any help.
- TWDM
- Posts: 53
- Joined: Sat Sep 05, 2015 9:07 am
Re: Vertical garden barometer
Attached is the project code.
- Attachments
-
- code.py
- Project code
- (9.05 KiB) Downloaded 12 times
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Vertical garden barometer
Code: Select all
reading_label.text = "Now {:.3f}".format(0.0002953 * reading1)
reading2_label.text = "Last {:.3f}".format(0.0002953 * reading2)
reading3_label.text = "Prev {:.3f}".format(0.0002953 * reading3)
- TWDM
- Posts: 53
- Joined: Sat Sep 05, 2015 9:07 am
Re: Vertical garden barometer
Thank you very much. My conversation number was wrong, it should have been 0.02953. I see the decimal determination number. I will have to some searching about formatting outputs in python. Again thank you.
Please be positive and constructive with your questions and comments.