This is a module that can measure temperature using thermocoupler K, J, T, N, E, S, B, and R type sensors.
* Although the CFTC-1L's hardware and design is rated for the broad ranges listed above, and can be used with probes rated for those ranges, the CFTC-1L has only been validated for temperatures in the range of -50℃ ~ 500℃.
1. <html>
#include "CFMEGA.h"
</html> library registration
2. CFNET object creation: e.g. CFNET object name ⇒ CFNET cfnet;
3. Call the function(s):
Object Name.tcSetInit(); ⇒ cfnet.tcSetInit(0,0);Object Name.tcTempRead(); ⇒ cfnet.tcTempRead(0);This function sets the sensor type to be used for the address module specified as the initialization setting.
Reads the measured temperature value as a floating point type to the second decimal place.
address: The address of the module as configured by its DIP switch (0~7)
A value of -1111 is returned if a thermocouple is not connected, or an otherwise invalid reading is detected (e.g. the value read is out of range for the thermocouple type).
#include "CFMEGA.h" CFNET cfnet; void setup() { Serial.begin(9600); cfnet.tcSetInit(0,0); cfnet.tcSetInit(1,0); } void loop() { float k_temp_0 = cfnet.tcTempRead(0); float k_temp_1 = cfnet.tcTempRead(1); Serial.print("Thermocouple 0 : "); Serial.print(k_temp_0); Serial.print("°C"); Serial.println(); Serial.print("Thermocouple 1 : "); Serial.print(k_temp_1); Serial.print("°C"); Serial.println(); Serial.println();Serial.println(); delay(200); }
You need to purchase a wire-type sensor to connect this product. If you already have the connector-type, open the connector and convert it to wire-type.