help pls

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
hplarocnic15
Posts: 6
Joined: 12 Jul 2018 11:47

help pls

#1 Post by hplarocnic15 » 15 Jul 2018 12:15

idk what to do, the complier errors the dht11_int(),dht11_start() and dht11_read() what should i do? pls reply asap





sbit LCD_RS at RB2_bit;
sbit LCD_EN at RB3_bit;
sbit LCD_D4 at RB4_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D7 at RB7_bit;

sbit LCD_RS_Direction at TRISB2_bit;
sbit LCD_EN_Direction at TRISB3_bit;
sbit LCD_D4_Direction at TRISB4_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D7_Direction at TRISB7_bit;

//DHT11 DEFINITONS
sbit DHT11_Pin at PORTB.B0;
sbit DHT11_DIR at TRISB.B0;
extern unsigned int DHT11_TMP;
extern unsigned int DHT11_HUM;
extern char DHT11_CHKSM;
//END OF DHT11 DEFINITONS

long veri;
int isi,nem;
char bekleme=0;
char txt[7];

//////////////////////////////////////////////

void main() {
ADCON1=0x0f;
lcd_init();
DHT11_init();
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Cmd(_LCD_CLEAR);
lcd_out(1,1,"Temp.=");
Lcd_Out(2,1,"Hum.=");
delay_ms(500);


while(1)
{
Dht11_Start();
DHT11_Read();

if(DHT11_CHKSM==((DHT11_TMP>>8)+(DHT11_HUM>>8)+(DHT11_TMP&0xff)+(DHT11_HUM&0xff)))
{
inttostr(DHT11_TMP>>8,txt);
lcd_out(1,8,txt);
inttostr(DHT11_HUM>>8,txt);
lcd_out(2,8,txt);
}
}

}

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: help pls

#2 Post by filip.grujcic » 16 Jul 2018 15:17

Hello,

These errors indicate that you either don't have the DHT11 library installed, or that you didn't include it(tick it) in the Library Manager.

Get the library here if you don't have it:
https://libstock.mikroe.com/projects/vi ... ro-for-pic

Kind regards,
Filip Grujcic

Post Reply

Return to “PIC PRO Compilers”