You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found this library, it's perfect for my project. I did have to make a change to skip rather than raise an exception for my purpose. I just log the error and continue. I would have to restart app coroutine every time it threw an error. In my case I bumped the breadboard and accidentally pulled the GND wire out ;-)
Additionally I added a method to help eliminate the natural fluctuation in temp readings...
def average_measurement(self):
averages = [] # List of readings
temp = 0
for measurement in range(128): # Number of samples
temp = self.read_temperature_fahrenheit()
averages.append(temp) # Read sensor and append reading to list
time.sleep_ms(10)
# print("Measured Avg Temperature: " + str(temp) + " F")
temp = int(sum(averages) / len(averages))
return temp
Anyways nice library, thanks!!!
The text was updated successfully, but these errors were encountered:
I am glad to hear that you like the library! Thanks so much for telling me about your use case and suggesting improvements. I'm new to doing open source, but I will figure out how to add your averaging function to the code base. Thanks again!
Found this library, it's perfect for my project. I did have to make a change to skip rather than raise an exception for my purpose. I just log the error and continue. I would have to restart app coroutine every time it threw an error. In my case I bumped the breadboard and accidentally pulled the GND wire out ;-)
Additionally I added a method to help eliminate the natural fluctuation in temp readings...
Anyways nice library, thanks!!!
The text was updated successfully, but these errors were encountered: