[solved] Grove High Temperature Sensor

I purchased the Grove High Temperature Sensor and assumed there would be Python code examples to allow me to easily read it - I was wrong.

The code provided for the sensor is C code meant to run on an Arduino: https://github.com/Seeed-Studio/Grove_HighTemp_Sensor/blob/master/Hight_Temp.cpp.

The product FAQ ( http://support.seeedstudio.com/knowledgebase/articles/743697-grove-high-temperature-sensor-sku-111020002 ) simply states that there are GrovePi examples for analog read, and to modify them - so not incredibly helpful.

I think I need to read the pin value, then do some fancy math on it to get the actual read temperature value. I think I understand the C code enough to be able to do that.

When I plug the sensor into port A0 and run grovepi.analogRead(0), I get a value that hovers around 67. When I dipped the end of the thermocouple into recently boiled water, the reading floated around 90. When I unplugged the sensor entirely, the reading floated around 312.

Is the value I’m getting back the voltage on the port in mV? I realize I still need to do the fancy math, but I just want to make sure I’m getting expected values first.

Hi quasipickle,

We are already working on this library sensor.
For the moment, we don’t have have an official version of it, but I think I can offer you the unofficial one.

This sensor library may undergo modifications, so consider it a prototype.

Please follow this topic.

Thank you!

1 Like

Excellent! Thank you.

Reading through the high_temperature_example file, I see you’re using pins 14 & 15 to correspond to port A0. I will have multiple high temperature sensors, so if I connect to port A1 and A2, would those correspond to ports [16,17] and [18,19] respectively?

Hi quasipickle,


Please take a look here:

As you can see in this image, whether you use the orange notation (pin 14,15) or the blue notation (pin 0,1), it doesn’t matter as long as you set the up the pinMode accordingly.

In the image you can see that port A0 all the way up through A2 have multiple functionalities.

Also, if you take a look at the ports arrangement, you’ll see that any two analog ports share one common pin except for A0 and A2 ports. So, you are only capable of using 2 high-temperature sensors because each of them need 2 analog input pins.


TL;DR

  1. pinMode(14, 'INPUT') is the same as pinMode(0, 'INPUT')

  2. pinMode(14, 'OUTPUT') is the same as pinMode(0, 'OUTPUT')

This is analogous for all other pins.

Here’s a link which can thoroughly describe the hardware ports.


Thank you

I assume the inability to use all 3 analog ports simultaneously is due to the fact that the high-temp sensor has 2 sensors & uses 2 pins? Otherwise, what’s the point of having A1?

Hi quasipickle,

That’s exactly the reason.
The sensor needs 2 analog pins, whereas all 3 ports (A0, A1, A2) on the GrovePi are tied to only 4 analog inputs.

Let me know if there’s anything you want to understand.

Thank you

1 Like

This topic was automatically closed after 23 hours. New replies are no longer allowed.