All Questions
Tagged with string arduino-ide
20 questions
0
votes
1
answer
162
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 ...
2
votes
1
answer
135
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.
...
0
votes
1
answer
255
views
String Comparison [closed]
I am trying to compare two string but each time i am getting awkward results. When i use Equals() function i always get the wrong answer and never satisfy the IF statement. When i use compareTo() ...
2
votes
2
answers
1k
views
Read & Write to EEPROM
I need to implement EEPROM Read & Write functionality to my project.
I've been learning how to use the EEPROM on the last few days, however I'm struggling to Read & Write Strings to EEPROM.
...
1
vote
1
answer
7k
views
invalid conversion from 'char' to 'const char*' [-fpermissive] on a string
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 = &...
2
votes
0
answers
46
views
Split string using a delimiter then saving to different variables [duplicate]
I have a string that looks something like this "43;27;42;27". It is the data from 4 DHT22 temperature sensors, i need to splice this string every ";" and save the number to a variable. In the end, I ...
-1
votes
2
answers
2k
views
Reading from SPIFFS - What's the best way to deal with a string (or char) array with undefined length?
I've read that it's best to avoid using String in Arduino so I'm ready to use a char array if it's better.
I'm reading the file names from an SD Card and my goal is to store them in an array and then ...
1
vote
1
answer
173
views
Comparing a text string to text output (DHT22)
Lately I've received a DHT22 sensor. I've started to create a small temperature and humidity monitor station. One of the things I noticed was if you pulled out the sensor while in use, it displayed "...
1
vote
1
answer
754
views
I can't receive string that I have sent through nrf correctly
I'm using arduino uno and nrf24l01. to monitor sensor data.
But this is the message that master receives:
⸮
this is my slave code.
void monitoring() {
delay(10);
radio.stopListening();
...
1
vote
1
answer
305
views
Yet another basic and silly question about C++ strings
I made a sketch like this:
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
char str1[64] = "test with spaces";
char str2[32] = "test with spaces";
Serial....
0
votes
1
answer
570
views
Second item in array not gets assigned from struct object, ArduinoJson
I got the below code generated this amazing tool.
const size_t capacity = JSON_ARRAY_SIZE(2) + JSON_OBJECT_SIZE(1) + JSON_OBJECT_SIZE(4) + 2*JSON_OBJECT_SIZE(7);
DynamicJsonDocument doc(capacity);
...
3
votes
0
answers
5k
views
String.format("%i",i) equivalent
How do I format an arduino String when I do not want to print it?
I know that one can use printf() or other methods to print a formated string and unfortunately that's all I find with google.
But that'...
3
votes
2
answers
23k
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 ...
2
votes
1
answer
6k
views
How to transmit string data using the rc-switch library?
I am using the rc-switch library for sending and receiving data. In rcswitch library, there is no method to send string data. I am using below method to send the string message in char buffer.
...
2
votes
1
answer
1k
views
Ubuntu class string has no member remove
I am running some code that works fine on my windows system using the .remove method. On Ubuntu 16.04 I get the following errror:
error: ‘class String’ has no member named ‘remove’
To see if it was ...