Skip to main content

Questions tagged [string]

A sequence of characters -- including letters, numbers and symbols -- often used for representing information in a human-readable format.

Filter by
Sorted by
Tagged with
0 votes
1 answer
115 views

I am running a project where I have multiple ESP32s communicate over WebSockets and I am using the Arduino IDE 2.3.4 for it. The communication primarily uses JSON and sends it as strings. To work with ...
Joel's user avatar
  • 103
-1 votes
1 answer
46 views

I wrote code for my transmitter Arduino. I want to send the data to the receiver Arduino through Tx and Rx serial. The issue is that I could not discard the char "T" and it appears as output ...
anwar alfawdaei's user avatar
0 votes
1 answer
2k views

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/...
Hubert B's user avatar
1 vote
1 answer
1k views

I have to handle a String coming in over UART containing a bunch of information, part of it is a MAC-address that I get by using String.substring(a, b) returning a 12-char String representing a mac-...
Harald Lesan's user avatar
3 votes
1 answer
2k views

Code Snippet: String a; const int red_led_pin = 13; void setup() { Serial.begin(115200); Serial.println("Hello, ESP32-S2!"); pinMode(red_led_pin, OUTPUT); } void loop() { ...
3kstc's user avatar
  • 221
0 votes
2 answers
479 views

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, ...
Yan Araújo's user avatar
0 votes
2 answers
104 views

I am trying to make a drop down selection with gyverportal. The issue is that I don't know how many items there are so the list cannot be hard coded. Here is an example from github: GP.SELECT("...
Gerge's user avatar
  • 1
2 votes
0 answers
360 views

I just wrote some code that just sends a string from Arduino to Processing. Processing prints the string and displays the number of characters in the buffer... After uploading the sketch to the ...
Robot12's user avatar
  • 21
0 votes
2 answers
852 views

I am newbie in Arduino and writing a program where I want to control the flow by using Serial monitor input (PI controller). I've read that using String() although easier it is slower than using char. ...
Ognyan Petkov's user avatar
2 votes
1 answer
1k views

I want to use snprintf() to format floats to a string. I know the "normal" version of Arduino's avrlibc had all the float-formatting code removed to make it smaller. I also know that at some ...
Bitbang3r's user avatar
  • 561
1 vote
1 answer
9k views

I am sending a string from a Raspberry Pi to an ESP32 via BT. I am getting one ASCII value per line. How to convert it into one whole String? I tried as follows, but I get an error while running the ...
matmagdt's user avatar
0 votes
3 answers
1k views

I want to replace the ":"(colon) in the MAC address with no char (remove the ":"). But I can't find any good solution. String.replace(), can't replace with (void). Note: String....
Instigator's user avatar
0 votes
1 answer
2k views

I'm trying to build arduino nonce generator, but the only thing I found is this question on arduino forum but I can't find out how to make it work for me. I checked and Serial.available() is always 0 ...
krystof18's user avatar
  • 315
0 votes
1 answer
148 views

I am getting multiple messages from a GPS device at different frequencies. After getting strings I have to save this data on the SD card. It works well when we have the same frequencies messages but ...
Omar Rai's user avatar
1 vote
1 answer
2k views

I am trying use a HMI display. If I want to send a data, for example I want to write "TOPWAY" to 0x00000080 address it should like that: Serial.write(0xaa); // packet head Serial....
mehmet's user avatar
  • 297
1 vote
1 answer
399 views

I am trying to figure out how to capture the OK or the ERROR from a SIM800l. I have tried mySerial.println("AT"); while (mySerial.available() > 0 ) { String str = mySerial.readString(); ...
maxum's user avatar
  • 145
1 vote
1 answer
7k views

I am compiling some code I didn't write, and it bombs out with the error message invalid conversion from 'char' to 'const char*' [-fpermissive] on the line if (loginPassword == '\0') loginPassword = &...
Ben Dauphinee's user avatar
1 vote
1 answer
3k views

Hello everyone I write my code and have some troubles. When I write on in my serial monitor my buzzer condition wasn't changed. Can you help me realize the reason. I wrote code with int type and it ...
Shushan Abovyan's user avatar
0 votes
2 answers
243 views

I use bluetooth (works like serial monitor). Let me say i send a text to my hc-05 (same as sending to serial monitor) My current code is displaying text from serial monitor/HC-05 TO LCD #include <...
redoc's user avatar
  • 119
1 vote
0 answers
77 views

I am trying to keep the program within a loop until the user inputs "ok" on the Bluefruit Connect App. I use the readString() function on the bluetooth object (ble) to read from it. Before ...
Cem Adatepe's user avatar
1 vote
2 answers
1k views

I have following function for my Arduino: String readLine() { String received = ""; char ch; while (myFile.available()) { ch = myFile.read(); if (ch == '\n' or ch == '\r') { ...
sharkyenergy's user avatar
1 vote
1 answer
327 views

I have this callback function in my Firmata sketch. It receives a string as a character array and does something with it. The problem is, that the string is being sent to the Arduino in T\0h\0i\0s\0 ...
Starter's user avatar
  • 153
0 votes
0 answers
85 views

I've been working on a cipher based project, and I wanted to prep the encrypted string for use with the RF24 library. Since the payload size for the RF24 module is 32 bytes, I wanted to stick with ...
Okabe_'s user avatar
  • 17
2 votes
1 answer
167 views

I am using the Arduino IDE to run and monitor, with an Arduino Nano clone. This code shows what I mean by the question: char foo = 127; char bar = 128; Serial.println(String(foo, BIN)); Serial.println(...
Boba0514's user avatar
1 vote
0 answers
1k views

I am trying to create a class and getting getting the error incompatible types in assignment of 'const String' to 'char [32] when I declare char inString[32]; and try to set it as inString = server....
brad's user avatar
  • 201

1
2 3 4 5
7