Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
<code>hc1.c as main

C++
#include<io.h>
/*Includes io.h header file where all the Input/Output Registers and its Bits are defined for all AVR microcontrollers*/

#define    F_CPU    8000000
/*Defines a macro for the delay.h header file. F_CPU is the microcontroller frequency value for the delay.h header file. Default value of F_CPU in delay.h header file is 1000000(1MHz)*/

#include<delay.h>
/*Includes delay.h header file which defines two functions, _delay_ms (millisecond delay) and _delay_us (microsecond delay)*/

#include<hc05.h>
/*Includes hc05.h header file which defines different functions for HC-05 Bluetooth Module. HC-05 header file version is 1.1*/


void main(void)
{
    delay_ms(500);
    delay_ms(500);
    /*Delay of 1s*/
    
    usart_init();
    /*USART initialization*/
    
    hc_05_bluetooth_transmit_string("ABLab Solutions");
    /*Transmits a string to Bluetooth Module*/

    hc_05_bluetooth_transmit_byte(0x0d);
    /*Transmits Carriage return to Bluetooth Module*/
    
    hc_05_bluetooth_transmit_byte(0x0a);
    /*Transmits New Line to Bluetooth Module for new line*/

    hc_05_bluetooth_transmit_string("www.ablab.in");
    /*Transmits a string to Bluetooth Module*/

    hc_05_bluetooth_transmit_byte(0x0d);
    /*Transmits Carriage return to Bluetooth Module*/
    
    hc_05_bluetooth_transmit_byte(0x0a);
    /*Transmits New Line to Bluetooth Module for new line*/
}
/*End of program*/


What I have tried:

JavaScript
Error: C:\cvavr\inc\usart.h(113): undefined symbol 'unsignedchar'
Error: C:\cvavr\inc\usart.h(114): undefined symbol 'unsignedchar'
Error: C:\cvavr\inc\usart.h(114): undefined symbol 'i'
Error: C:\cvavr\inc\usart.h(117): undefined symbol 'i'
Error: C:\cvavr\inc\usart.h(120): undefined symbol 'temp'
Error: C:\cvavr\inc\usart.h(122): undefined symbol 'temp'
Posted
Updated 27-Jun-16 19:36pm
Comments
Patrice T 27-Jun-16 20:27pm    
Source code not related to errors
shsmszdh 28-Jun-16 16:46pm    
thanks i did your suggestion and errors reduced to these: please help me
Error: C:\cvavreval\inc\usart.h(114), #include-d from: hc05.h: undefined symbol 'unsigned'
Error: C:\cvavreval\inc\usart.h(114), #include-d from: hc05.h: undefined symbol 'i'
Error: C:\cvavreval\inc\usart.h(117), #include-d from: hc05.h: undefined symbol 'i'
Error: C:\cvavreval\inc\hc05.h(67), #include-d from: hc1.c: undefined symbol 'unsigned'
Error: C:\cvavreval\inc\hc05.h(67), #include-d from: hc1.c: undefined symbol 'i'
Error: C:\cvavreval\inc\hc05.h(70), #include-d from: hc1.c: undefined symbol 'j'
Error: C:\cvavreval\inc\hc05.h(188), #include-d from: hc1.c: must declare first in block

1 solution

Don't try to split your code across multiple questions: it makes it harder to answer.
And possibly impossible, since none of them contain "full" informations.

Instead, look at the error messages, think about them, and probably it becomes obvious.
There is no unsignedchar data type: it has a space in it.
Edit the usart.h header file the message talks about, go to line 113, and change unsignedchar to unsigned char and recompile.
The chances are most of your errors will disappear.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900