Max6675 热电偶

入手了一个热电偶温度传感器,这种东西是专门用来测试温度的,接触式的,具有测量范围大,精度高的特点。Taobao上搜索 "Arduino 热电偶",卖家没有几个,我是从“圣源电子制作”的店铺卖的。

他家直接提供的代码包有问题,其中对应的Arduino程序无法打开。不知道是否有其他朋友也遇到过同样的问题。好在网上搜索到了对应的库 http://www.geek-workshop.com/forum.php?mod=viewthread&tid=4554&highlight=max6675 。测试了一下工作正常。最后代码如下

#include "Max6675.h"

Max6675 ts(8, 9, 10);
// Max6675 module: SO on pin #8, SS on pin #9, CSK on pin #10 of Arduino UNO
// Other pins are capable to run this library, as long as digitalRead works on SO,
// and digitalWrite works on SS and CSK

void setup()
{
	ts.setOffset(0);
	// set offset for temperature measurement.
	// 1 stannds for 0.25 Celsius

	Serial.begin(9600);
}


void loop()
{
	Serial.print(ts.getCelsius(), 2);
	Serial.print(" C / ");
	Serial.print(ts.getFahrenheit(), 2);
	Serial.print(" F / ");
	Serial.print(ts.getKelvin(), 2);
	Serial.print(" K\n");
	delay(300);
}

运行结果

完整的代码库下载

Max6675

PT100

《Max6675 热电偶》有2个想法

回复 ziv2013 取消回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注