You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boolisConnected(); //Returns true if the thermocouple will acknowledge over I2C, and false otherwise
58
-
uint16_tdeviceID(); //Returns the contents of the device ID register. The upper 8 bits are constant, but the lower contain revision data.
59
-
boolcheckDeviceID(); //Returns true if the constant upper 8 bits in the device ID register are what they should be according to the datasheet.
60
-
61
-
floatthermocoupleTemp(); //Returns the thermocouple temperature in degrees Celcius
62
-
floatambientTemp(); //Returns the ambient (IC die) temperature in degrees Celcius
63
-
floattempDelta(); //Returns the difference in temperature between the thermocouple and ambient junctions, in degrees Celcius
64
-
65
-
uint8_tsetThermocoupleType(thermocoupleType type); //Sets the type of thermocouple connected to the MCP9600. Supported types are KJTNSEBR.
66
-
uint8_tsetFilterCoeffecients(uint8_t coeffecient); //Sets how heavy of an exponential moving average filter to use. Set this to 0 for no filter, 1 for minimum filter, and 7 for maximum filter.
67
-
68
-
private:
69
-
TwoWire *_i2cPort; //Generic connection to user's chosen I2C port
70
-
uint8_t _deviceAddress; //I2C address of the MCP9600
71
-
uint8_treadSingleRegister(MCP9600_Register reg); //Attempts to read a single register, will keep trying for retryAttempts amount of times
72
-
uint16_treadDoubleRegister(MCP9600_Register reg); //Attempts to read two registers, will keep trying for retryAttempts amount of times
73
-
uint8_twriteSingleRegister(MCP9600_Register reg, uint8_t data); //Attempts to write data into a single 8-bit register. Does not check to make sure it was written successfully.
boolisConnected(); //Returns true if the thermocouple will acknowledge over I2C, and false otherwise
74
+
uint16_tdeviceID(); //Returns the contents of the device ID register. The upper 8 bits are constant, but the lower contain revision data.
75
+
boolcheckDeviceID(); //Returns true if the constant upper 8 bits in the device ID register are what they should be according to the datasheet.
76
+
boolresetToDefaults(); //Resets all device parameters to their default values. Returns 1 if there was an error, zero otherwise.
77
+
78
+
//Sensor measurements
79
+
floatthermocoupleTemp(); //Returns the thermocouple temperature in degrees Celcius
80
+
floatambientTemp(); //Returns the ambient (IC die) temperature in degrees Celcius
81
+
floattempDelta(); //Returns the difference in temperature between the thermocouple and ambient junctions, in degrees Celcius
82
+
83
+
//Measurement configuration
84
+
boolsetAmbientResolution(ambientResolution res); //Changes the resolution on the cold (ambient) junction, for either 0.0625 or 0.25 degree C resolution. Lower resolution reduces conversion time.
85
+
ambientResolution getAmbientResolution(); //Returns the resolution on the cold (ambient) junction, for either 0.0625 or 0.25 degree C resolution. Lower resolution reduces conversion time.
86
+
boolsetThermocoupleResolution(thermocoupleResolution res); //Changes the resolution on the hot (thermocouple) junction, for either 18, 16, 14, or 12-bit resolution. Lower resolution reduces conversion time.
87
+
thermocoupleResolution getThermocoupleResolution(); //Returns the resolution on the hot (thermocouple) junction, for either 18, 16, 14, or 12-bit resolution. Lower resolution reduces conversion time.
88
+
89
+
uint8_tsetThermocoupleType(thermocoupleType type); //Changes the type of thermocouple connected to the MCP9600. Supported types are KJTNSEBR.
90
+
thermocoupleType getThermocoupleType(); //Returns the type of thermocouple connected to the MCP9600 as found in its configuration register. Supported types are KJTNSEBR.
91
+
uint8_tsetFilterCoeffecients(uint8_t coeffecient); //Changes the weight of the on-chip exponential moving average filter. Set this to 0 for no filter, 1 for minimum filter, and 7 for maximum filter.
92
+
uint8_tgetFilterCoeffecients(); //Returns the weight of the on-chip exponential moving average filter.
93
+
94
+
95
+
//Internal I2C Abstraction
96
+
private:
97
+
TwoWire *_i2cPort; //Generic connection to user's chosen I2C port
98
+
uint8_t _deviceAddress; //I2C address of the MCP9600
99
+
uint8_treadSingleRegister(MCP9600_Register reg); //Attempts to read a single register, will keep trying for retryAttempts amount of times
100
+
uint16_treadDoubleRegister(MCP9600_Register reg); //Attempts to read two registers, will keep trying for retryAttempts amount of times
101
+
boolwriteSingleRegister(MCP9600_Register reg, uint8_t data); //Attempts to write data into a single 8-bit register. Does not check to make sure it was written successfully.
0 commit comments