Questions tagged [string]
A sequence of characters -- including letters, numbers and symbols -- often used for representing information in a human-readable format.
325 questions
0
votes
1
answer
119
views
Accessing invalid key in ArduinoJson causes ESP32 to reboot [closed]
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 ...
5
votes
1
answer
239
views
MQTT connection fails when using String objects
On my ESP32 I am trying to connect to my HomeAssistant server using ArduinoHA library.
I can easily connect when hard-coding the credentials: mqtt.begin("server", "username", "...
-1
votes
1
answer
46
views
Fail to discard the character T from my transmitter Arduino
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 ...
0
votes
1
answer
534
views
String or unsigned char to uint8_t
I'm attempting to save a string to EEPROM of an ESP8266 radio and then read it back before I encrypt the data (evenutally I would like to save the encrypted data but I'm simplifing things at the ...
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/...
-1
votes
1
answer
102
views
Reading a string from the serial port and comparing to another string
I'm using an Arduino Mega 2560 and writing a really simple piece of code that doesn't work.
String a, letra;
#define led 13
void setup() {
Serial.begin(9600); // opens serial port, sets data rate ...
1
vote
1
answer
1k
views
Parse char* mac-string to uint8_t array
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-...
1
vote
0
answers
128
views
Serial does not receive all chars
I'm trying to follow Serial Input Basics to build a program which receives commands over serial like "<led:12,34,21>" but i'm stuck on receiving the characters from serial...
I have ...
3
votes
1
answer
2k
views
if statement with string comparison
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() {
...
-1
votes
1
answer
668
views
How can i separate values from the full string, incoming string always changes its positions?
String str = {"timestamp": "2023-02-08 16-37-31" ,"cpcb_device": [{"Station" : "832","Para": [{"tag_name": "COD","...
0
votes
2
answers
479
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
167
views
Replace char based on user input
I am developing a hangman game on tinyduino(tinycircuits) and I am currently stuck on how to properly replace a char based on user input within a for loop. My current code does actually replace the ...
0
votes
2
answers
104
views
generate x item long list for gyverportal drop-down selection
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("...
2
votes
1
answer
140
views
for loop crashes program
Just started out with tinyduino(tinycircuits) and I am trying to develop a hangman game. I have this chunk of code that randomly picks a word from my array. I've omitted some code for readability.
...
2
votes
0
answers
361
views
Arduino filling serial buffer with nulls
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 ...