InNeedOfHelp
Full Member level 3
including I2C routines
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
If(temp > 27) PORTCbits.RC2 = 1;
WriteCmdXLCD(0xC0);
WriteCmdXLCD(0x80);
WriteCmdXLCD(0xC0);
WriteCmdXLCD(0x80);
if(LastTemp > 26) //If the value of LastTemp is more than 26 but not inclusive of 26
{
PORTB = 0XFF;/*PORTB which is the LEDS(RBO,RB1,RB2,RB3) will light up
to give a warning to the user that the temperature is getting too warmed ,
even if i connect a Fan controller to the RB4,RB5,RB6
or RB7 and the aboved conditons are met , the fan will turn on by itself
without using a pushbutton*/
}
else if (LastTemp <= 26) //If the value of LastTemp is less than and inclusive of 26
{
PORTB=0X00;/*PORTB which is the LEDS(RBO,RB1,RB2,RB3) will NOT light up ,
as the above conditions are met , LEDs will be off and
Fan will be off as well*/
}
Code C - [expand] 1 2 3 4 5 6 7 if(LastTemp >= 25) { PORTB = 0x00; } else if(LastTemp >= 27) { Delay_ms(10); PORTB = 0xFF; }