Questions tagged [char]
The char tag has no summary.
9 questions
0
votes
1
answer
89
views
How can I make this function take up less memory? [duplicate]
I've written a sketch that uses TimeLib to display elapsed time. I'm measuring how long it takes to drain a battery. The goal is to display the time as hh:mm:ss.
The code I use works well when I ...
1
vote
1
answer
227
views
How do I convert a structure to a char[] for use in Wire.h, or is there a better way?
I need to interface an ATTiny88 MCU configured as an I²C slave with a Raspberry Pi configured as an I²C master. I may be using the wrong approach, but I have a structure consisting of four different ...
0
votes
1
answer
226
views
Problem saving "char" variable to EEPROM on ESP32
I am making a project, in which I need to store the WiFi credentials to the EEPROM. For now, I am able to store a bool array in the EEPROM, but I am not able to store the char variables as the ESP32 ...
0
votes
1
answer
2k
views
Construct Strings with UTF-8 characters from data
I am printing some ASCII art to the Serial monitor from Arduino UNO, with some success. However, using string literals uses more memory than I would like. I wanted to try constructing the strings/...
0
votes
2
answers
478
views
Problem cleaning string read from serial buffer
I am trying to move a stepper motor when a specific command is send to Arduino Mega 2560. This command is read character by character and stored in a string variable. Whenever a new command is sent, ...
0
votes
1
answer
203
views
char * variable - Handle correctly to avoid overflow
I'm trying to understand if a char * variable can be updated down the code (since it only stores a pointer) or over-flow can occur.
For example:
char *A="/file.txt";
char *B;
void ...
-1
votes
2
answers
360
views
Char array filling with blanks
When I run this code, my pin and pinCheck arrays are not being filled with the results of keypad.getKey(). If I print the value at each index, the result is blank. As far as I can tell, I am either ...
0
votes
1
answer
140
views
pointing to array of chars
I'm trying to pass a list of files (located in sketch) to be read using a library I write. List can have different filenames and vary in number of files.
How to pass a this array to my library?
for ...
1
vote
1
answer
2k
views
Assign a list of char *
Explain in a simple example. How to pass a char* to a function?
#define name1 "ABCD"
#define name2 "EFGH"
#define name3 "HIJK"
char *list[3] = {};
void printList(char *...