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

learn more… | top users | synonyms (1)

0
votes
2answers
36 views

Problems splitting a string to get authentication and command

Good afternoon, In a nutshell I'm having some difficulty with splitting and returning part of a string. Essentially I'm working on the code for transmitting a password (24 character string) and ...
0
votes
0answers
17 views

Getting all decimal places into a string [duplicate]

hello guys am new to arduino and am working on a project were i need to get a data value which is a double and adding it to a string of other values, however the full value is not displayed, it only ...
1
vote
1answer
77 views

float precision in arduino

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 ...
-1
votes
2answers
57 views

How to Display data from Strings?

i am working in an interactive project in displaying texts in POV which people can click to generate different texts automatically i wrote a String to store the text first, but it seems cannot display ...
1
vote
1answer
382 views

How do I send a string to master using i2c

I want to write an Arduino program that simply recieves a string (via the I2C wire library) from a master Arduino, then waits for a request, and sends that string back. Here is my code: #include ...
0
votes
1answer
54 views

How to return a message when calling by a TCP connection?

I am working on a communication between android and arduino board. The android make a TCP connection with the board and successfully send some string to the board. The problem is , there is a int ...
0
votes
1answer
48 views

OSC parsing code. Can it be optimised?

I'm using this OSC library and TouchOSC to controls some motors. Right now I'm receiving those two kind of messages: /u/1 // move motor 1 of default steps /u/2 // move motor 2 of default ...
0
votes
2answers
138 views

Simple word translator, return error: invalid array assignment

I know this is not a good question. But I am clueless with this error : invalid array assignment (at function convert). For extra information, I involved a lot of copying/pasting programs I haven't ...
0
votes
1answer
77 views

Is there any way that the values here be converted to another variable and not string?

int val1 =(mfrc522.uid.uidByte[0]); int val2 =(mfrc522.uid.uidByte[1]); int val3 =(mfrc522.uid.uidByte[2]); int val4 =(mfrc522.uid.uidByte[3]); String valA=String(val1); String valB=String(val2); ...
0
votes
1answer
112 views

Simple Text input using 5 buttons

So I have to get this function done but I'm not so bright and got confused. (excuse me! I'm total noob) The function is basically inputing text using five buttons, directional buttons and an ok ...
0
votes
2answers
130 views

How to split in string

I want to split this: char* value = "12;32;blue"; or string value = "12;32;blue"; into this vars: TV = 12; AR = 32; LED = "blue"; is it possible?
0
votes
0answers
140 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
2answers
70 views

sprintf trouble

char cTime[22]; sprintf(cTime, "%04s/%02s/%2s:%02s:%02s:%02s", year(), month(), day(), hour(), minute(), second()); This sprintf line causes this error:**B0100000063f694Š Could someone help me ...
0
votes
1answer
309 views

DateTime to string

For some reason I can't use the Time.h lib. Can you guys tell me how to create a string from the datetime into a format like this: "yyyy.MM.dd:hh.mm.ss" 2014.10.29:07.12.33 Seems odd that I can't ...
1
vote
1answer
86 views

Problems with substring loop

Hey folks … I was hoping some of you might cast your eye over my code. It splits up a string read from EEprom into an array of separate strings. Based on String length information stored in a ...
0
votes
1answer
471 views

Print string from arduino to serial monitor

I want to send text over serial monitor to Arduino and make Arduino return that string back to me over serial monitor. I have made this function which reads from serial input and returns a string ...
1
vote
1answer
190 views

GSM library , sendSMS, string instead of char

I used the GSM library that comes together with arduino 1. Specifically the sendSMS part. I managed sucesfully to send SMS. Now the thing is, inside this library the SMS to send is stored in a char ...
1
vote
2answers
186 views

appending string to char and vice versa

Some days ago i started a thread. concatenation of non constant character array with a sting I have a different question but on the same nature (string and chars) what i want is one variable (string ...
1
vote
2answers
885 views

concatenation of non constant character array with a sting

I have an arduino duemilanove. I read this page on string concatenation. http://arduino.cc/en/Tutorial/StringAdditionOperator Yet, it didnt include my case. I have a non constant character array, ...
1
vote
1answer
551 views

How to use String.substring?

I have the following code in which requestLine is always empty and I can't figure out why. request contains a raw HTTP request, and I want to get the first line of the request which contains the ...
4
votes
2answers
106 views

Convert a Bitstring into an integer value

I have got a String filled up with 0 and 1 and would like to get an Integer out of it: String bitString = ""; int Number; int tmp; bitString = ""; for (i=1;i<=10;i++) { tmp= analogRead ...
3
votes
1answer
706 views

Check contents of buffer after serial read

I would like to test the contents of data received over a serial connection. In my loop() I store the data in bffr; and afterwards I would like to test to see if there are some predefined words in it. ...
9
votes
6answers
29k views

How do I split an incoming string?

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 : ...
0
votes
1answer
988 views

Nothng Written to Serial when using sprintf

I'm using sprintf to use a format specifier myTemplate with some strings. The result will then be written to Serial. Although the sketch compiles fine, it does not write any thing to the serial, ...
6
votes
1answer
613 views

Is it better to use c_str or toCharArray?

When reading/trying a recent answer, I was surprised to see that Arduino's String class supports the c_str() method, just like the C++ std::string class. As expected, it appears to get a pointer to ...
18
votes
5answers
27k views

How do I print multiple variables in a string?

Say I have some variables that I want to print out to the terminal, what's the easiest way to print them in a string? Currently I do something like this: Serial.print("Var 1:");Serial.println(var1); ...