Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c-string]

The tag has no usage guidance.

1
vote
1answer
34 views

Using c_str() on String for IPAddress with NTPClient provides wrong values

Libraries NTPClient Board Olimex ESP32-POE board Behaviour I have written a code that connects the board to a local NTP Server (which is an embedded board). I tried assigning the IP Address of ...
2
votes
2answers
66 views

Problems on convert byte[] to String

I'm reading a RFID Card from RC522 and send the data to my computer. My problem is the conversion of byte[] to String or std::string. #define SIZE_BUFFER 18 #define MAX_SIZE_BLOCK 16 byte ...
0
votes
3answers
59 views

formatting strings in Arduino for output

I wander what is the best option for formatting strings in Arduino for output. I mean what's a preferable way in the point of view of performance, memory usage – things like that. I see, people ...
0
votes
0answers
61 views

recursive function doesn't generate correct output inside loop()

I'm new to Arduino and C programming and trying to write a program for playing Paper Soccer game. I have written a recursive function called findPossibleMoves() which generates a String object ...
1
vote
1answer
737 views

Char* and string conversion from an ESP8266 web server

I have the following Arduino code for configuring a wifi connection through a simple webpage: I declare char* ssid;. Later I read a value from a SPIFFS config file where q_ssid is declared as a ...
0
votes
2answers
676 views

Arduino GSM module + SMS string sending garbage value

I want to check the water level and have an SMS sent via a GSM module. Reed switches are connected to four Arduino analog inputs. I am unable to add a string and tank level (TKLVL) in program. The ...
0
votes
2answers
975 views

Max length of char arrays?

I'm running the following Sketch on my Arduino Uno: const boolean verbose = true; void debug(const char *s){ if(verbose){ char buf[8 + sizeof(s)] = "[DEBUG] "; strcat(buf, s); ...
0
votes
1answer
362 views

Store 3-dimensional char array in program memory with PROGMEM

I'm running a sketch whith a quite big, constant three dimensional char array (or simply, a table of strings). As this takes lots of RAM I'd like to store it in programm memory in order to keep the ...
1
vote
1answer
21k views

Convert int to char[]

I'm looking to convert an int value to a char array. currently I've found the following will return [number] int num = [number] str = String(num); str.toCharArray(cstr,16); Serial.println(cstr); ...