User Tools

Site Tools

한국어

cfnet:cftc1l

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cfnet:cftc1l [2026/02/21 23:54] – created - external edit 127.0.0.1cfnet:cftc1l [2026/03/29 04:49] (current) – [CFTC-1L] admin
Line 1: Line 1:
 ======CFTC-1L====== ======CFTC-1L======
 +
 +Currently, this product is available for use with Modular FADUINO. It cannot be used with CFHDR-8U or ModularPi.
 +
 This is a module that can measure temperature using thermocoupler K, J, T, N, E, S, B, and R type sensors. This is a module that can measure temperature using thermocoupler K, J, T, N, E, S, B, and R type sensors.
  
Line 23: Line 26:
 =====Wiring method===== =====Wiring method=====
  
-{{:modularfaduino:cftc-1.png?nolink |}}+{{.:cftc-1.png?nolink |}}
  
 ===== Setting the module's address ===== ===== Setting the module's address =====
Line 29: Line 32:
   * The address setting method is different from other I/O modules:  Only one of the DIP switches should be turned ON at any time.   * The address setting method is different from other I/O modules:  Only one of the DIP switches should be turned ON at any time.
  
-{{ :modularfaduino:cftc-1dsw.png?nolink |}} +{{ .:cftc-1dsw.png?nolink |}}
-=====How to use the API===== +
- +
-1. <html><code>#include "CFMEGA.h"</code></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);'' +
- +
-====-u8 tcSetInit(u8 addr, u8 sensor) ==== +
-This function sets the sensor type to be used for the address module specified as the initialization setting. +
-  * address: module dip switch value (0~7) +
-  * sensor: Sensor type (**Type K = 0, J = 1, T = 2, N = 3, S = 4, E = 5, B = 6, R =** 7) +
- +
-====- float tcTempRead(u8 addr)==== +
-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).** +
- +
-<code c> +
-#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); +
-+
- +
-</code> +
- +
-===== Sensor type ===== +
- +
-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. +
- +
-{{ :modularfaduino:wireeng.png?nolink |}}+
  
 +[[index|CFNET]]
  
-[[modularfaduino:index|Modular FADUINO]] 
cfnet/cftc1l.1771718053.txt.gz · Last modified: by 127.0.0.1