Rabu, 24 Agustus 2016

Convert Char Array to String

Bismillahirrohmanirrohim
Bisa kalian gunakan fungsi ini mudah mudahan bermanfaat,jika merasa belum paham bisa ajukan pertanyaan di komentar atau contact facebook saya atau email fickrymhd@gmail.com

String item;
Char buffer[4];
buffer[1]  = ‘1’;
buffer[2]  = ‘2’;
buffer[3]  = ‘3’;
buffer[4]  = ‘4’; 
for(int k=0; k<bufferPos; k++) 
{
Serial.print(buffer[k]);
Serial.print("\t");
Serial.println(item);
item += buffer[k];
}

Share:

0 comments:

Posting Komentar

Copyright © FILAB | Powered by FILAB
Design by Fickry Muhammad | Technology by Filab.id