31 ESP_LOGCONFIG(TAG,
"Setting up MCP9600...");
44 bool success = this->
write_byte(MCP9600_REGISTER_STATUS, 0x00);
46 success |= this->
write_byte(MCP9600_REGISTER_CONFIG, 0x00);
47 success |= this->
write_byte(MCP9600_REGISTER_ALERT1_CONFIG, 0x00);
48 success |= this->
write_byte(MCP9600_REGISTER_ALERT2_CONFIG, 0x00);
49 success |= this->
write_byte(MCP9600_REGISTER_ALERT3_CONFIG, 0x00);
50 success |= this->
write_byte(MCP9600_REGISTER_ALERT4_CONFIG, 0x00);
51 success |= this->
write_byte(MCP9600_REGISTER_ALERT1_HYSTERESIS, 0x00);
52 success |= this->
write_byte(MCP9600_REGISTER_ALERT2_HYSTERESIS, 0x00);
53 success |= this->
write_byte(MCP9600_REGISTER_ALERT3_HYSTERESIS, 0x00);
54 success |= this->
write_byte(MCP9600_REGISTER_ALERT4_HYSTERESIS, 0x00);
55 success |= this->
write_byte_16(MCP9600_REGISTER_ALERT1_LIMIT, 0x0000);
56 success |= this->
write_byte_16(MCP9600_REGISTER_ALERT2_LIMIT, 0x0000);
57 success |= this->
write_byte_16(MCP9600_REGISTER_ALERT3_LIMIT, 0x0000);
58 success |= this->
write_byte_16(MCP9600_REGISTER_ALERT4_LIMIT, 0x0000);
92 uint16_t raw_hot_junction_temperature;
93 if (!this->
read_byte_16(MCP9600_REGISTER_HOT_JUNCTION, &raw_hot_junction_temperature)) {
97 float hot_junction_temperature = int16_t(raw_hot_junction_temperature) * 0.0625;
102 uint16_t raw_cold_junction_temperature;
103 if (!this->
read_byte_16(MCP9600_REGISTER_COLD_JUNTION, &raw_cold_junction_temperature)) {
107 float cold_junction_temperature = int16_t(raw_cold_junction_temperature) * 0.0625;