(Arduino Study) temperature sensing

Temperature sensing  using thermister
Thermister gives resistance value depend on temperature changing.







...
#include < math.h>

void setup(void)
{
  Serial.begin(9600);
}

double Thermister(int RawADC){
  double Temp;
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
  Temp = Temp - 273.15;  
  
  return Temp;
}

void printTemp(void){
  double fTemp;
  double temp = Thermister( analogRead(0) );
  
  //read sensor value
  Serial.println("Temperature is:");
  Serial.println(temp);
}

void loop(void)
{
  printTemp();
  delay(1000);
}
---

Comments

Popular posts from this blog

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

OpenCV Stitching example (Stitcher class, Panorama)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Real-time N camera stitching Class.

Optical Flow sample source code using OpenCV

OpenCV Drawing Example, (line, circle, rectangle, ellipse, polyline, fillConvexPoly, putText, drawContours)

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)

SICK LMS511 sensor data acquisition interface (source code, C++/MFC)

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Image warping (using opencv findHomography, warpPerspective)