Black Lives Matter - Action and Equality.
0

PyPortal and temperature sensor
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PyPortal and temperature sensor

by gordonmeyer on Tue May 12, 2020 12:04 pm

Greetings. I want to use a PyPortal to display a room's temperature, but I'm finding that having the display (backlight) turned on severely impacts the accuracy of the temperature reading. Is this a known issue or am I just missing some obvious way to resolve this? The attached spike in 5-minute samples shows how having the display turned on makes the reading shoot up. Thanks in advance for any advice.

Screen Shot 2020-05-12 at 10.56.53 AM.png
temp reading
Screen Shot 2020-05-12 at 10.56.53 AM.png (57.18 KiB) Viewed 23 times

gordonmeyer
 
Posts: 3
Joined: Mon May 11, 2020 2:31 pm

Re: PyPortal and temperature sensor

by adafruit_support_carter on Tue May 12, 2020 1:03 pm

Yep, that's known. Here's an example of a project that selectively turns the backlight on to help with this:

https://learn.adafruit.com/pyportal-sma ... aq-3023075

adafruit_support_carter
 
Posts: 15647
Joined: Tue Nov 29, 2016 2:45 pm

Re: PyPortal and temperature sensor

by gordonmeyer on Tue May 12, 2020 2:12 pm

Ah, thanks for confirming. Clever solution.

gordonmeyer
 
Posts: 3
Joined: Mon May 11, 2020 2:31 pm

Re: PyPortal and temperature sensor

by gordonmeyer on Wed May 13, 2020 12:31 pm

For anyone who reads this in the future, based on the sample code above, what I am doing is using touch instead of the light sensor (the light sensor isn't very reliable for me, either) and then, after turning off the screen, waiting for two minutes before recording another measure. This seems to be long enough to allow the temperature sensor to return to normal after the screen is off.

gordonmeyer
 
Posts: 3
Joined: Mon May 11, 2020 2:31 pm

Please be positive and constructive with your questions and comments.