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
71 votes
12 answers
458k views

I am sending a list of servo positions via the serial connection to the arduino in the following format 1:90&2:80&3:180 Which would be parsed as: servoId : Position & servoId : Position &...
ValrikRobot's user avatar
3 votes
4 answers
16k views

How to compare a string coming from serial monitor with some predefined text stored as a local variable? If I say: int led = 2; String a = " abcds"; void setup(){ Serial.begin(9600); } void loop(...
Iulian Chirvasa's user avatar
1 vote
2 answers
23k views

I am reading a string which i have to convert into a float with a maximum of precision.I didn't want to use toFloat() function since it make a truncation so i made my own code. My problem is that the ...
ChiPlusPlus's user avatar
3 votes
2 answers
2k views

I'm writing a little API for processing email messages in Arduinos. Obviously, I need to keep memory use down, but I also want to allow the end user to use the String functions (like indexOf) to ...
Etienne's user avatar
  • 33
12 votes
6 answers
5k views

I've been reading a lot over the years why we should not use the notorious String class and how heap fragmentation is bad practice and not professional and we should never use it in our programs or we'...
Nino's user avatar
  • 411
7 votes
7 answers
11k views

Why “Strings” are bad for Arduino? Which is the most efficient and fastest solution to read and store the data from Accelerometer and GPS? Stings are evil for Arduino An Uno or other ATmega328-based ...
Andrea Ciufo's user avatar
3 votes
1 answer
1k views

I'm using an Adafruit NRF8001 Low Energy Bluetooth module and a Real Time Clock module with my Arduino board. I want to connect to the BLE module using UART to set the clock. I'll also be using UART ...
Ian Nebbiolo's user avatar
2 votes
1 answer
6k views

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. ...
Chayan Mistry's user avatar
1 vote
2 answers
2k views

My apologies if this is a naive question. How do I convert a String which has hex values to a byte array that has those hex values? This: String s = "0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff"...
Amir's user avatar
  • 41
1 vote
1 answer
478 views

I suspect that I might be using too many resources, because of the strings, but I am new to Arduino, so not sure where I am going wrong. Any help would be appreciated. What it should do when complete:...
E_Ja's user avatar
  • 21
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
5k views

Here is my code. The incoming string is "*CRB12344,Temp25,Humidity55,CC5#" I am unable to get value of Temp which is 25 and Humidity which is 55 and CC which 5. It only display the value of CR i.e ...
MICRO's user avatar
  • 500
1 vote
2 answers
4k views

I want to read strings from Serial.read() to send them later. To get the data from the Serial monitor I'm doing this: String stringOne = ""; int incomingByte; if (Serial.available() > 0) { ...
Luis Ramon Ramirez Rodriguez's user avatar
0 votes
3 answers
3k views

I am running the following code on my ESP8266 (AI-Thinker ESP8266MOD). I send an HTTP GET request and a pin is set to high for a 1/2 second. However, after some time (sometimes 1hr, 2hrs, 12hrs, ...
David Klempfner's user avatar