Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help in Arduino Codes

Status
Not open for further replies.

brian25

Member level 2
Member level 2
Joined
Feb 18, 2013
Messages
52
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Visit site
Activity points
1,601
hi sir/ma'am how to convert a char to a string?

i got this error.

sketch_aug27a:90: error: invalid conversion from 'char' to 'const char*'
sketch_aug27a:90: error: initializing argument 1 of 'String::String(const char*)'
sketch_aug27a:93: error: invalid conversion from 'char' to 'const char*'
sketch_aug27a:93: error: initializing argument 1 of 'unsigned char String::equals(const char*) const'



Code:
char x;
n[20];

     
      if((x, n)>0)   // Number, Number length
      {
      String num=x;
      if(num.equals("12345")){
      Serial.print("Ok");
     }
     else{
     Serial.print("Done");
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top