Questions tagged [string]

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

29 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
275 views

Compare barcode scanner string with existed string

I have a project which is reading barcode scanner result then compare with an existed string. I have used the library USB host shield in order to read data from barcode scanner then I would like to ...
2
votes
0answers
2k views

save bytes from Serial into ROM (EEPROM)

I am trying to save an incoming text from serial into the ROM of the Arduino using EEPROM. I found out that you can only save a byte at once. So I thought I could do it like that: #include <EEPROM....
1
vote
0answers
39 views

Serial1.readString() on arduino mega returns an empty string

i have been trying to read text message from a sim module over serial1 of arduino mega, when i use the code msg = Serial1.readString(); the readString return an empty string i dont know if this is a ...
1
vote
0answers
30 views

Can't test for equality with string received from bluetooth module

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 ...
1
vote
0answers
45 views

Erratic behavior in String based functions

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 ...
1
vote
0answers
62 views

incompatible types in assignment of 'const String' to 'char [32] using server.arg

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....
1
vote
1answer
51 views

Arduino keypad variables to serial port

I've been trying, for over a week now, to create a program that will store my keypad presses into variable, and with a press of an enter, it will switch to the next variable to store the presses. The ...
1
vote
0answers
60 views

Arduino blocks when serving web pages

I have an Arduino sketch that serves an HTML web page using the standard Ethernet library (https://github.com/arduino-libraries/Ethernet) and the Ethernet Web Server library (https://github.com/khoih-...
1
vote
0answers
49 views

LiquidCrystal swap lines with interrupt

#include <Wire.h> #include <LiquidCrystal.h> int temp; const int rs = 13, en = 12, d4 = 11, d5 = 10, d6 = 9, d7 = 8; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); char Nick[15] = {' ', ' ', '...
1
vote
0answers
50 views

ESP8266 EEPROM Reading extra character

I am very very new to ESP Programming. I am trying to store Strings into EEPROM of ESP8266. I am storing the string into eeprom successfully but while reading it from EEPROM extra character 'd' is ...
1
vote
0answers
39 views

How to compare an incoming byte from cool terminal as modbus hex value and compare it with a predefined value in set in the program?

My Input from Cool terminal is 05 03 00 01 00 02 94 4F I should be able to read this input 05 03 00 01 00 02 94 4F compare with the same(05 03 00 01 00 02 94 4F). If the incoming value(05 03 00 ...
1
vote
0answers
134 views

BLE splitting string data

I am working with BLE 4.2 (ESP32) that sends IMU (accel, gyro, mag) data to my mobile app (Android). Unfortunately, I can send only 20 bytes in one packet. This is the code I have: (I am connecting ...
1
vote
0answers
123 views

Sensor to detect whether string is in tension?

I need a sensor to detect whether there is tension on a string or not. I do not need an accurate measurement of the amount of tension- just whether the string is being pulled on or is taut. ...
1
vote
0answers
2k 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'...
1
vote
0answers
72 views

Problem: char string not working with SoftwareSerial.h

I am creating a program to display text on an OLED display and then have it sent to a thermal printer. The issue is my second char string: word_buffer When I try to use word_buffer for any reason it ...
1
vote
0answers
341 views

append a String on ArduinoJson Object value

I've a json string request coming from server and I convert it into json object StaticJsonBuffer<500> jsonStaticBuffer; JsonObject& root = jsonStaticBuffer.parseObject(String(msg)); ...
1
vote
0answers
218 views

How to store an array of doubles? As array of doubles, Strings or const char *? Then convert back to use?

This seems like an old, solved problem, but I can't find any simple answers. I'm reading latitude and longitude data as Strings from a file (about 50 points), but they are really double float numbers. ...
1
vote
0answers
795 views

Checking string condition?

I'm looking for my Arduino board to jump to a function based on an if condition, where a string (content) is checked to see if it matches the word FALLEN. However, the if condition never occurs ...
0
votes
0answers
159 views

HC-12 problem with reading momentarily strings

I'm new here, so I hope my question is not naive. I'm using Arduino mega connected with a pulse sensor and a GPS (and other things that are not related to our problem), pulse sensor and GPS data are ...
0
votes
1answer
50 views

How to assign a string-variable to a StackString based on the StackString-library?

I'm trying to use the StackString-library which offers not to eat up RAM over time by re-assigning values to strings. I started from scratch and wrote a very basic democode which works. Then I added ...
0
votes
2answers
561 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 ...
0
votes
1answer
791 views

Convert JSON into string for MQTT

I am trying to publish json object into string with following snippet JSONVar data; data["chipid"] = chipId; data["co2_equivalent"] = co2_equivalent.c_str(); data["tvoc"] = tvoc.c_str(); data["...
0
votes
0answers
35 views

How to create parametric variable in class decleration

I hope the subject of this question if correct. in timeOUT constructor, 3 more instances of other class are defined: endTimeOUT_inFlash(key1), inCodeTimeOUT_inFlash(key2), updatedTimeOUT_inFlash(...
0
votes
0answers
864 views

string.charAt() is not returning the correct value

I know this is a super basic question, and I did try debugging, but somehow I think I am missing the way variable stores value in Arduino. int enablePin = 2; // ebanble pin for slave String ...
0
votes
0answers
239 views

Parsing UDP text from a Command using UDP

I want to send a parameter from my computer (i.e using Hercules software) using UDP protocol to my Arduino with Ethernet shield to turn 2 LED on and off (each of them). The command I'm using is: $A&...
-1
votes
1answer
598 views

Arduino - Extracting Multiple Strings from Serial Read

I am trying to write an Arduino code that reads a long string, example <11,22,33>, through the Serial Monitor and then stores the 11,22, and 33 into separate bins of a matrix array. So the user ...
-1
votes
1answer
35 views

arduino mega multi integer values reading on other arduino mega

I need two Arduino communications. The master arduino from the slave arduino needs to read 16 signals. The sample serial port output from the slave is as follows. @ 125 @ 13 @ 874 @ 1023 & 950 @...
-1
votes
1answer
666 views

Attempting to read random string from SD card

I was wondering if anyone knew how to read in a random string from a file named "PhraseList.csv" or "PhraseList.xlsx" (whatever is easier)? There is a list of 10k. #include <SD.h> #include <...
-2
votes
1answer
111 views

Including string class in Eclipse Neon

Probably basic question but when I type include in class of my arduino project I get only error. How do I properly include this string class?