I am not too knowledgeable about string...i want to recieve data,sending by the pc,and if the start of the data is d it will store to char num,????plz help me!!1
while (Serial1.available()>0){
d=Serial1.read();
if (d=='a'){String.toCharArray(num, 11);}
What, exactly, are you trying to get into num? You've read ONE character from the serial port. You do not have a String instance. Even if you didn't, you haven't populated it with data from the serial port.
i am wrong to my question...i am trying to store data from pc to arduino store it in a num...if the start is 'a ' the following number will be store to num...
while (Serial1.available()>0){
d=Serial1.read();
if (d=='a'){String.toCharArray(num, 11);}