Way more context is needed for this question. You have a pointer to some memory. You can access the data being pointed to as if the pointer was an array. The nth character is printed using:
Serial.print("The 3rd character is: ");
Serial.println(tempchar[3]);
The useless String class deals with signed chars, not unsigned chars.
Why any moron would make their code return character data in a non-conventional data type is the real mystery.
Context :
Data is lying an an sd Card in the arduino. As soon as you want the data you just walk by with your smartphone, connect over BLE and chose one of the folders availible on the SD Card. The Arduino reads the data and tramnsmits it over BLE so you can plot the Data on your smartphone.
the SD.open() Method needs a String, if you want to access a Specificfolder. So i want to convert the const unsigned char* to a String.
The upper-case String refers an Arduino C++ class for managing and manipulating characters. There are lots of reasons to avoid String. Here's one of the best: The Evils of Arduino Strings.
The lower-case string refers to C/C++ character arrays, like char str[10], or double-quoted constants, "like this." Double-quoted string constants are of type const char *. You should use the F macro wherever possible to force them to be used from FLASH memory, instead of copying them to RAM:
Serial.print( F("This saves RAM") );
The SD open call requires a const char *, so you can pass a character array that you filled out, or you can pass a double-quoted string constant. You cannot pass a String
-dev:
The SD open call requires a const char *, so you can pass a character array that you filled out, or you can pass a double-quoted string constant. You cannot pass a String
There are versions for both const char * and String:
Holy mackerel, Paul. You're not going to turn momo into the Feds or anything, are you? I tuned in here to find some answers. Instead, I'm reading the interrogation of this poor person. Could we stick to answers and being decent to each other? Cool.
chocolatchips:
Holy mackerel, Paul. You're not going to turn momo into the Feds or anything, are you? I tuned in here to find some answers. Instead, I'm reading the interrogation of this poor person. Could we stick to answers and being decent to each other? Cool.
the dude has more than 80K posts, most with similar tone but usually worse. But folks generally see the gold within the sharks's mouth.
your efforts are commendable but scolding him has proven futile, so jump on the pain train and watch the learning happen!