我正在尝试使用 PIC16F877A MCU 和两个 DS8B20 传感器检测上升和下降的温度。当我尝试检测温度下降时,我遇到了问题。这是我的代码我想做什么:
#include "main.h"
void main() {
//Turn on LCD backlight
output_high(PIN_D7);
// Initialize LCD module
lcd_init();
float Threshold_Value = 30; // Temperature threshold value
while (TRUE) {
Show_User_Info();
delay_ms(10);
Read_Sensors();
// Starting to read user button values
User_Buttons();
delay_ms(20); // Minimum amount of time to read user button values
// Starting to compare user set temperature value and upper sensor temperature read value.
Compare_Upper_Temp();
delay_ms(20);
//================================
// Checking, if the MCU pin connected to pump …Run Code Online (Sandbox Code Playgroud)