Project Seven - Temperature


Next on our Grove journey is the temperature sensor . It is an analog form of input, and as described earlier returns a voltage potential relative to the ambient temperature. We measure this voltage using an analog pin, and convert it to a temperature.

Connect the Temperature Sensor to the Analog A0/A1 input jack. The Grove unit produces an analog voltage on its D1 output, which is connected to Arduino A0 analog input on the A0/A1 input jack.

Now upload the following Arduino sketch:

// Project Seven - temperature

int a;
int del=1000; // duration between temperature readings
float ctemperature;
float ftemperature;
int B=3975;
float resistance;

void setup()

void loop()
  Serial.print("C ");

You can copy and paste the lines above to add temperature capability to your own sketches.

After you have uploaded the sketch, open the serial monitor window in the Arduino IDE, and you should be presented with a box similar to this:

Help us make it better

Welcome to the new documentation system of Seeed Studio. We have made a lot of progress comparing to the old wiki system and will continue to improve it to make it more user friendly and helpful. The improvement can't be done without your kindly feedback. If you have any suggestions or findings, you are most welcome to submit the amended version as our contributor via Github or give us suggestions in the survey below, it would be more appreciated if you could leave your email so that we can reply to you. Happy Hacking!