Temperature sensor

grovepi
temperature

#1

Hello experts,
I am trying to run grove_temperature_sensor from the given sample scripts. When I open the py file, I see as per instructions it is asking me to connect to analog port A0.

When I run it, I get following output

('temp =', 256.829434239294)
('temp =', 256.829434239294)
('temp =', 307.829434239294)....

line 246 error.

Value Error: math domain error

Any pointers? What is the expected value.


#2

Hi @shashank.tilwalli,

That should be caused by some arithmetic calculation that doesn’t make any sense, mathematically speaking.

Hmm, there should be something coming from that log. Can you place some prints in the following function and see what the output is?

Thank you!