Vertical garden barometer

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
TWDM
 
Posts: 53
Joined: Sat Sep 05, 2015 9:07 am

Vertical garden barometer

Post by TWDM »

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.

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Vertical garden barometer

Post by Franklin97355 »

What readings are you getting? Can you post your code>

User avatar
TWDM
 
Posts: 53
Joined: Sat Sep 05, 2015 9:07 am

Re: Vertical garden barometer

Post by TWDM »

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.

User avatar
TWDM
 
Posts: 53
Joined: Sat Sep 05, 2015 9:07 am

Re: Vertical garden barometer

Post by TWDM »

Attached is the project code.
Attachments
code.py
Project code
(9.05 KiB) Downloaded 12 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Vertical garden barometer

Post by adafruit_support_carter »

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)

User avatar
TWDM
 
Posts: 53
Joined: Sat Sep 05, 2015 9:07 am

Re: Vertical garden barometer

Post by TWDM »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “CLUE Board”