Comments: LilyPad Temperature Sensor Hookup Guide

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #1533240 / about 5 years ago / 1

    Hi, I am very new to the Arduino hardware. I've just got the LilyPad Temp sensor, hooked up with LilyPad USB. But my readings are very fluctuating, about 20F (60~80) at room temp of around 70F. I made the reading faster by lowering delay value from default 1000 to 500, 250, 100, 50, 25, 10, and finally 1. But fluctuation doesn't get stabilized... I've copied and pasted the example code from this page. Is there a way to fix it?

    • santaimpersonator / about 5 years ago / 1

      Hi there, it sounds like you are looking for technical assistance. Please use the link in the banner above, to get started with posting a topic in our forums. Our technical support team will do their best to assist you.

      That being said, you may need to modify how the readings are interpreted. As shown in the Interpreting Sensor Readings section, the code:

      // Calculate the voltage, based on that value.
      // Multiply by maximum voltage (3.3V) and divide by maximum ADC value (1023).
      // If you plan on using this with a LilyPad Simple Arduino on USB power, change to 4.2
      voltage = rawTemp * (3.3 / 1023.0);
      

      uses a basic linear interpolation of the analog output. By taking readings at multiple values, you should be able to modify this code to map your sensor's data more accurately than the generalized example code. Otherwise, this may be a precision issue which would be hard to isolate without going down the rabbit hole of physics and electronics knowledge.


If you've found an issue with this tutorial content, please send us your feedback!