Read the current temperature and print it to the terminal
cmake_minimum_required(VERSION 3.3)
project(MAX6675_Demo)
create_simple_executable(${PROJECT_NAME} MAX6675_Demo.cpp)
const uint32_t
FREQ = 10000;
pwOut <<
"Welcome to the MAX6675 demo!\n";
uint16_t data;
while (1) {
pwOut.
printf(
"Temp: %u.%uC\n", data >> 2, (data & 0x3) * 25);
waitcnt(CLKFREQ / 2 + CNT);
}
}