majeed1352
Newbie level 3
Hi,
I want to get a string from UART1 and analyse it with switch...case as follow:
char Comm[12];
.
.
if(Uart1_data_Readey()){
Uart1_read_text(Comm,".",255);
.
.
switch(Comm){
case "ON": .. .. .. ..; break;
case "OFF":.. .. .. ..; break;
.
.
default: Lcd_out_cp("BAD COMMAND";}
but the cumpiler says: " Operator " is not applicable to these operands"
What should I do to resolve it. Please guide me.
Thanks
I want to get a string from UART1 and analyse it with switch...case as follow:
char Comm[12];
.
.
if(Uart1_data_Readey()){
Uart1_read_text(Comm,".",255);
.
.
switch(Comm){
case "ON": .. .. .. ..; break;
case "OFF":.. .. .. ..; break;
.
.
default: Lcd_out_cp("BAD COMMAND";}
but the cumpiler says: " Operator " is not applicable to these operands"
What should I do to resolve it. Please guide me.
Thanks